(Ubuntu 12.04)
gem install sqlite3
给出:
$ gem install sqlite3
Building native extensions. This could take a while...
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.
/home/durrantm/.rvm/rubies/ruby-1.9.3-p194/bin/ruby 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 ***
最佳答案
我看到你在使用 Linux。安装 libsqlite3-dev
包应该可以解决您的问题(至少在 Debian 上是这样称呼的)。
例如sudo apt-get install libsqlite3-dev
如果这不是正确的包名称,只需查看 sqlite3 的开发包(其中包括头文件,通常是编译器/链接器中间文件)。
关于ruby-on-rails - gem install sqlite3 出现错误 - sqlite3.h 丢失,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/12451964/