gem install sqlite3-ruby

时间:2011-05-23 01:41:48

标签: ruby-on-rails ruby-on-rails-3 gem sqlite3-ruby

当我尝试安装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/local/rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb
checking for sqlite3.h... yes
checking for sqlite3_libversion_number() in -lsqlite3... yes
checking for rb_proc_arity()... yes
checking for sqlite3_initialize()... no
sqlite3-ruby only supports sqlite3 versions 3.6.16+, please upgrade!
*** 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/local/rvm/rubies/ruby-1.9.2-p180/bin/ruby
        --with-sqlite3-dir
        --without-sqlite3-dir
        --with-sqlite3-include
        --without-sqlite3-include=${sqlite3-dir}/include
        --with-sqlite3-lib
        --without-sqlite3-lib=${sqlite3-dir}/lib
        --with-sqlite3lib
        --without-sqlite3lib


Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.2-p180/gems/sqlite3-1.3.3 for inspection.
Results logged to /usr/local/rvm/gems/ruby-1.9.2-p180/gems/sqlite3-1.3.3/ext/sqlite3/gem_make.out

我已安装此软件包

i A libdbd-sqlite3-ruby1.8          - Ruby/DBI SQLite driver for Ruby 1.8      
i A libsqlite3-0                    - SQLite 3 shared library        
i   libsqlite3-dev                  - SQLite 3 development files                
i   libsqlite3-ruby                 - SQLite3 interface for Ruby                
i A libsqlite3-ruby1.8              - SQLite3 interface for Ruby 1.8
i   sqlite3                         - A command line interface for SQLite 3

1 个答案:

答案 0 :(得分:0)

看起来你需要更新你的sqlite3版本。不是任何宝石,而是实际的sqlite3包。使用您的发行版的软件包管理器升级到sqlite3> = 3.6.16+版本,或者从源代码编译它(可获得here