无法创建新的Rails应用程序。 Sqlite3将无法安装

时间:2013-01-17 06:12:30

标签: ruby-on-rails ruby sqlite

错误讯息:

Installing sqlite3 (1.3.7) with native extensions <br>
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.<br>

    /usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb 
checking for sqlite3.h... yes<br>
checking for sqlite3_libversion_number() in -lsqlite3... yes<br>
checking for rb_proc_arity()... yes<br>
checking for sqlite3_initialize()... yes<br>
checking for sqlite3_backup_init()... yes<br>
checking for sqlite3_column_database_name()... no<br>
checking for sqlite3_enable_load_extension()... yes<br>
checking for sqlite3_load_extension()... yes<br>
checking for sqlite3_open_v2()... yes<br>
checking for sqlite3_prepare_v2()... yes<br>
checking for sqlite3_int64 in sqlite3.h... yes<br>
checking for sqlite3_uint64 in sqlite3.h... yes<br>
creating Makefile<br>

make
compiling backup.c<br>
make: /robertmhirsch/bin/gcc.4.2: No such file or directory<br>
make: *** [backup.o] Error 1


Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.3-p194/gems/sqlite3-1.3.7 for inspection.<br>
Results logged to /usr/local/rvm/gems/ruby-1.9.3-p194/gems/sqlite3-1.3.7/ext/sqlite3/gem_make.out<br>
An error occured while installing sqlite3 (1.3.7), and Bundler cannot continue.<br>
Make sure that `gem install sqlite3 -v '1.3.7'` succeeds before bundling.<br>

1 个答案:

答案 0 :(得分:0)

我认为您需要安装GCC或同等产品。你没有提到你正在使用的操作系统,如果是Ubuntu,你可以通过

安装必要的东西
sudo apt-get install build-essential

对于OSX,请参阅http://cczona.com/blog/2012/07/fix-for-make-usrbingcc-4-2-no-such-file-or-directory/