当我在Ubuntu上尝试安装sqlite3的Gem时遇到了一个报错:
Building native extensions. This could take a while...
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Try 'port install sqlite3 +universal'
or 'yum install sqlite-devel' and check your shared library search path (the
location where your sqlite3 shared library is located).
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/ruby1.9.1
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/lib
--enable-local
--disable-local
Gem files will remain installed in /var/lib/gems/1.9.1/gems/sqlite3-1.3.6 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/sqlite3-1.3.6/ext/sqlite3/gem_make.out
在stackoverflow上,我找到了解决办法:
sudo apt-get install libsqlite3-dev
分享到:
相关推荐
sudo apt-get install sqlite3 libsqlite3-dev # 对于 Debian/Ubuntu sudo yum install sqlite-devel # 对于 CentOS/RHEL ``` 如果你遇到了特定版本的需求,例如压缩包文件名中提到的 `sqlite3-ruby-1.2.1-...
sudo gem install sqlite3-ruby ``` 如果需要使用 MySQL 作为数据库: 1. **安装 MySQL 服务端和客户端:** ```bash sudo apt-get install mysql-server mysql-client ``` 2. **安装 Rails 的 MySQL 适配器:*...
sudo apt-get install build-essential zlib1g-dev libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev ``` 接下来,我们需要安装Ruby。通常,我们可以从官方源码编译安装,...
可以使用`sudo apt-get install nodejs sqlite3 libsqlite3-dev`来安装。 7. **配置RubyMine**: 下载并安装RubyMine IDE,然后在RubyMine中设置Ruby SDK为刚刚安装的Ruby版本,并配置Rails插件。RubyMine允许你...
sqlite3 # for rspec-rails Ruby 最安全的选择是将与安装了rvm的ruby(不是系统ruby)和专用于rspec-dev的干净gemset一起使用: rvm 2.6@rspec-dev --create # or whatever version of Ruby you prefer 还支持 。 ...
sudo apt-get install -y git-core curl zlib1g-dev libssl-dev libreadline6-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev libffi-dev git clone ...
魔术棒 为自己和朋友创建联赛和比赛。 发展 安装Ruby 尽管从技术上讲您不需要通过rbenv使用Ruby,但是建议您使用此设置。... 请通过您的OS软件包提供程序进行安装(例如:ubuntu 16上的sudo apt-get install l