简体   繁体   中英

gem install unf_ext -v '0.0.6' fails on Mountain Lion mac

This is the error I get when I run bundle install

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /Users/sam/.rvm/rubies/ree-1.8.7-2012.02/bin/ruby extconf.rb 
checking for main() in -lstdc++... yes
checking for ruby/encoding.h... no
creating Makefile
CXX is automatically set to g++-4.6

make
g++-4.6  -I. -I/opt/local/include -I. -I/Users/sam/.rvm/rubies/ree-1.8.7-2012.02/lib/ruby/1.8/i686-darwin12.5.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common -g -O2 -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl098/include  -fno-common -pipe -fno-common    -c unf.cc
make: g++-4.6: No such file or directory
make: *** [unf.o] Error 1


Gem files will remain installed in /Users/sam/.rvm/gems/ree-1.8.7-2012.02@global/gems/unf_ext-0.0.6 for inspection.
Results logged to /Users/sam/.rvm/gems/ree-1.8.7-2012.02@global/gems/unf_ext-0.0.6/ext/unf_ext/gem_make.out
An error occurred while installing unf_ext (0.0.6), and Bundler cannot continue.
Make sure that `gem install unf_ext -v '0.0.6'` succeeds before bundling.

It looks like g++ 4.6 is missing.

which g++ returns /usr/bin/g++ but which g++-4.6 returns nothing.

I definitely have Xcode Developer Tools installed. I'm not really sure what to do. How can I get bundle install to succeed?

Installed fine using jruby. Seems to be a problem with the ree version I was using.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM