Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Anyone having issues installing bson_ext gem in OSX lion

OSX Lion, Xcode 4.2, GCC 4.2

I get the following error installing bson_ext 1.4.1

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

/Users/user/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
checking for asprintf()... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.
like image 274
chourobin Avatar asked Oct 18 '11 20:10

chourobin


People also ask

Why can’t I install Mac OS X Lion?

Install failed. Mac OS X Lion couldn’t be installed, because the disk (volume name) is damaged and can’t be repaired. Click restart to restart your computer and try installing again.

How do I install Windows lion on a Mac?

The Lion installer needs to reach out to Apple's internet servers to download certain components required for the installation. After you have restarted your Mac with the Lion installer, click the Wi-Fi icon in the top-left corner of the screen. Then select your network and login to it with the appropriate password.

How to fix Avast not working on Mac OS X Lion?

If you don’t use Avast, a more general potential fix is to turn off the Mac OS X Lion Firewall (in Security & Privacy System Preferences), and delete the firewall-related com.apple.alf.plist file in /Library/Preferences ( via Terminal if needed ). After a restart, you can re-enable the Firewall.


1 Answers

I just ran into this. You should look in the mkmf.log file. Chances are, it's looking for GCC in the wrong place. I had to:

cd /usr/bin
sudo ln -s i686-apple-darwin11-llvm-gcc-4.2 i686-apple-darwin11-gcc-4.2.1

And all was well.

like image 174
Justin Ramos Avatar answered Oct 17 '22 16:10

Justin Ramos