Ruby on Railsメモ
2011年8月8日 (月) 09:27時点におけるAdmin (トーク | 投稿記録)による版 (ページの作成: Category:Tips == トラブルシューティング == === sqlite3-rubyのインストールに失敗する === CentOS5.4環境にて、sqlite3-rubyをインストールし...)
トラブルシューティング
sqlite3-rubyのインストールに失敗する
CentOS5.4環境にて、sqlite3-rubyをインストールしようとしたら以下エラーとなりました。
# gem install --remote sqlite3-ruby
Building native extensions. This could take a while...
ERROR: Error installing sqlite3-ruby:
ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
checking for sqlite3.h... yes
checking for sqlite3_libversion_number() in -lsqlite3... yes
checking for rb_proc_arity()... no
checking for sqlite3_initialize()... no
checking for sqlite3_backup_init()... no
checking for sqlite3_column_database_name()... no
checking for sqlite3_enable_load_extension()... no
checking for sqlite3_load_extension()... no
creating Makefile
make
gcc -I. -I. -I/usr/local/lib/ruby/1.8/x86_64-linux -I. -fPIC -g -O2 -c database.c
database.c: In function ‘initialize’:
database.c:47: error: ‘SQLITE_OPEN_READWRITE’ undeclared (first use in this function)
database.c:47: error: (Each undeclared identifier is reported only once
database.c:47: error: for each function it appears in.)
database.c:47: error: ‘SQLITE_OPEN_CREATE’ undeclared (first use in this function)
database.c:72: error: ‘SQLITE_OPEN_READONLY’ undeclared (first use in this function)
database.c: In function ‘set_sqlite3_func_result’:
database.c:278: error: ‘sqlite3_int64’ undeclared (first use in this function)
make: *** [database.o] エラー 1
Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/sqlite3-1.3.4 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.8/gems/sqlite3-1.3.4/ext/sqlite3/gem_make.out
CentOS5.4標準のsqlite3(3.3.6)を、2011/08/08時点の最新バージョンである3.7.7.1に置き換えたら正常にインストールできました。
- その他環境
- ruby 1.8.7
- gem 1.4.2
-- 2011年8月8日 (月) 18:27 (JST)
更新履歴
- ページ作成 -- 2011年8月8日 (月) 18:27 (JST)