Anyone having trouble installing bson_ext gem on OSX lion

OSX Lion, Xcode 4.2, GCC 4.2

I get the following error when setting 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. 
+6
source share
4 answers

I just ran into this. You should look in the mkmf.log file. Most likely, he is 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.

+2
source

The accepted answer did not help me. But that happened.

I use:

  • OS X 10.8.2
  • Xcode 4.6 (with command line tools)
  • bson_ext 1.8.2

cd /usr/bin && sudo ln -s ./gcc gcc-4.2

 $ gem install bson_ext -v 1.8.2 Building native extensions. This could take a while... Successfully installed bson_ext-1.8.2 1 gem installed Installing ri documentation for bson_ext-1.8.2... Installing RDoc documentation for bson_ext-1.8.2... 
+1
source

So, reinstalling OSX lion fixed the problem. I guess uninstalling xcode 4.1 primarily messed up my installation of developer tools.

Thanks for the help.

0
source

I don't use Xcode for anything other than the developer tool binaries, so I just uninstalled Xcode:

 sudo /Developer/Library/uninstall-devtools –mode=all 

And then install this:

https://github.com/kennethreitz/osx-gcc-installer

The problem was fixed, and I saved some HD space for download.

0
source

Source: https://habr.com/ru/post/899556/


All Articles