Install Sqlite3 Gem Error

I get the following error when trying to install Sqlite3 stone on OS X Lion with Xcode 4.2 installed:

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

        /Users/me/.rvm/rubies/ruby-1.9.3-p0/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()... yes
checking for sqlite3_backup_init()... yes
checking for sqlite3_column_database_name()... no
checking for sqlite3_enable_load_extension()... yes
checking for sqlite3_load_extension()... yes
creating Makefile

make
compiling backup.c
make: /usr/bin/gcc-4.2: No such file or directory
make: *** [backup.o] Error 1

Will the link to / usr / bin / llvm -gcc-4.2 be the only fix (seems a bit hacked)? Or am I missing something?

+5
source share
1 answer

It seems that Xcode 4.2 does not install gcc-4.2, but instead llvm-gcc-4.2. Obviously, Apple believes LLVM is mature enough to overload GCC.

There are two options that I can think of. You should be able to choose and be fine.

  • Use this GCC installer .

  • Symbian LLVM with sudo ln -s /usr/bin/llvm-gcc-4.2 /usr/bin/gcc-4.2.

+15

All Articles