安装Sqlite3-ruby错误

时间:2010-10-07 16:54:43

标签: sqlite3-ruby

当我尝试安装时:gem install sqlite3-ruby显示:

    Building native extensions.  This could take a while...
ERROR:  Error installing sqlite3-ruby:
    ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb
extconf.rb:3:in `require': no such file to load -- mkmf (LoadError)
    from extconf.rb:3


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.3.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.3.1/ext/sqlite3/gem_make.out

我的环境: sqlite:2.8.17 rails:3.0.0 红宝石:1.9.2 ubuntu:10.04 宝石:1.3.7

我在网上看到了所有类似的问题,没什么帮助,我该怎么办? :(

1 个答案:

答案 0 :(得分:2)

我有同样的问题。

解决了这个问题
sudo apt-get install sqlite3 libsqlite3-dev

然后以下命令有效。

sudo gem install sqlite3-ruby