4

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

1 回答 1

12

我看到你在 Linux 上。安装该libsqlite3-dev软件包应该可以解决您的问题(至少在 Debian 上是这样称呼的)。

例如sudo apt-get install libsqlite3-dev

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

于 2012-09-17T00:50:28.350 回答