gem install sqlite3给出错误 - 缺少sqlite3.h

时间:2012-09-17 00:46:06

标签: ruby-on-rails ruby sqlite gem install

(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 ***

1 个答案:

答案 0 :(得分:8)

我看到你在Linux上。安装libsqlite3-dev软件包应该可以解决您的问题(至少在Debian上调用它)。

e.g。 sudo apt-get install libsqlite3-dev

如果这不是正确的软件包名称,只需查看sqlite3的开发包(包括头文件,通常包括编译器/链接器中间文件)。