尝试在lion上安装json gem时,我得到以下输出:
gem install json -v ‘1.7.3’ Building native extensions. This could
take a while… ERROR: Error installing json: ERROR: Failed to build
gem native extension./Users/victorstan/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb creating Makefile
make compiling parser.c make: /usr/bin/gcc-4.2: No such file or
directory make: * [parser.o] Error 1
解决方法
使用哪个gcc并在/usr/bin/gcc-4.2中创建一个符号链接.例如
sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2