我已安装Mountain Lion(Mac OS X 10.8),现在gcc似乎不再可用了.我还安装了Xcode 4.4,因此没有更多/ Developer目录.
我需要gcc用于mac端口和ruby gems(具有本机扩展).
Xcode 4.4是否包含gcc或有没有办法安装gcc?
在ruby版本1.9.3(rvm)上进行bundle install或直接gem安装mysql2版本0.3.11时,我收到以下错误.但是当我安装最新版本0.3.16时,它可以工作.我还包括我的gcc版本供参考.
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/ginocarlocortez/.rvm/rubies/ruby-1.9.3-p547/bin/ruby extconf.rb
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for mysql.h... yes
checking for errmsg.h... yes
checking for mysqld_error.h... yes
creating Makefile
make clean
make
compiling client.c
couldn't understand kern.osversion `14.0.0'
compiling mysql2_ext.c
couldn't understand kern.osversion `14.0.0'
compiling result.c
couldn't understand kern.osversion `14.0.0'
linking shared-object mysql2/mysql2.bundle
couldn't understand kern.osversion `14.0.0'
ld: -rpath can only be used when targeting Mac OS X 10.5 or later
collect2: ld returned 1 …Run Code Online (Sandbox Code Playgroud)