3
votes

I have been trying to install Ruby 1.9.3 on OSX Lion but keep running into a make error

Kerrie-Yees-MacBook-Pro:~ kerrieyee$ rvm install 1.9.3 Installing Ruby from source to: /Users/kerrieyee/.rvm/rubies/ruby-1.9.3-p194, this may take a while depending on your cpu(s)...

ruby-1.9.3-p194 - #fetching

ruby-1.9.3-p194 - #extracted to /Users/kerrieyee/.rvm/src/ruby-1.9.3-p194 (already extracted)

ruby-1.9.3-p194 - #configuring

ruby-1.9.3-p194 - #compiling

Error running 'make ', please read /Users/kerrieyee/.rvm/log/ruby-1.9.3-p194/make.log There has been an error while running make. Halting the installation.

I have installed git 1.7.7.5, osx-gcc4.2, homebrew 0.9, and XCode 4.3 with command line Tools. I have tried installing the readline but still get the make error. I am also very new to ruby and don't know much about terminal so if more information is necessary, please also write the terminal command needed to get the information. Thank you!

As Per the suggestions, I have opened make.log file

the part that looks like the error portion reads

readline.c: In function ‘username_completion_proc_call’: readline.c:1499: error: ‘username_completion_function’ undeclared (first use in this function) readline.c:1499: error: (Each undeclared identifier is reported only once readline.c:1499: error: for each function it appears in.) make[2]: *** [readline.o] Error 1 make[1]: *** [ext/readline/all] Error 2 make: *** [build-ext] Error 2

Noticing that the error had something to do with the readline, I looked up other questions about readline and followed RVM Instructions.

I typed in rvm pkg install readline and rvm reinstall 1.9.3 --with-readline-dir=$rvm_path/usr

There is still the error:

Error running 'make ', please read /Users/kerrieyee/.rvm/log/ruby-1.9.3-p194/make.log There has been an error while running make. Halting the installation.

and the make.log file reads:

ld: in /usr/local/lib/libxml2.2.dylib, file was built for unsupported file format which is not the architecture being linked (x86_64) for architecture x86_64 collect2: ld returned 1 exit status make[2]: *** [../../.ext/x86_64-darwin11.4.0/tcltklib.bundle] Error 1 make[1]: *** [ext/tk/all] Error 2 make: *** [build-ext] Error 2

Also I ran brew doctor:

Kerrie-Yees-MacBook-Pro:~ kerrieyee$ brew doctor

Error: Unbrewed dylibs were found in /usr/local/lib. If you didn't put them there on purpose they could cause problems when building Homebrew formulae, and may need to be deleted.

Unexpected dylibs: /usr/local/lib/libexslt.0.dylib /usr/local/lib/libexslt.dylib /usr/local/lib/libhistory.6.0.dylib /usr/local/lib/libhistory.6.dylib /usr/local/lib/libhistory.dylib /usr/local/lib/libreadline.6.0.dylib /usr/local/lib/libreadline.6.dylib /usr/local/lib/libreadline.dylib /usr/local/lib/libruby.1.8.7.dylib /usr/local/lib/libruby.1.8.dylib /usr/local/lib/libruby.dylib /usr/local/lib/libsqlite3.0.8.6.dylib /usr/local/lib/libsqlite3.0.dylib /usr/local/lib/libsqlite3.dylib /usr/local/lib/libxml2.2.dylib /usr/local/lib/libxml2.dylib /usr/local/lib/libxslt.1.dylib /usr/local/lib/libxslt.dylib

Error: Unbrewed .la files were found in /usr/local/lib. If you didn't put them there on purpose they could cause problems when building Homebrew formulae, and may need to be deleted.

Unexpected .la files: /usr/local/lib/libexslt.la /usr/local/lib/libsqlite3.la /usr/local/lib/libxml2.la /usr/local/lib/libxslt.la

Error: Unbrewed .pc files were found in /usr/local/lib/pkgconfig. If you didn't put them there on purpose they could cause problems when building Homebrew formulae, and may need to be deleted.

Unexpected .pc files: /usr/local/lib/pkgconfig/libexslt.pc /usr/local/lib/pkgconfig/libxml-2.0.pc /usr/local/lib/pkgconfig/libxslt.pc /usr/local/lib/pkgconfig/sqlite3.pc

Error: Unbrewed static libraries were found in /usr/local/lib. If you didn't put them there on purpose they could cause problems when building Homebrew formulae, and may need to be deleted.

Unexpected static libraries: /usr/local/lib/libexslt.a /usr/local/lib/libhistory.a /usr/local/lib/libreadline.a /usr/local/lib/libruby-static.a /usr/local/lib/libsqlite3.a /usr/local/lib/libxml2.a /usr/local/lib/libxslt.a

2
Did you follow the suggestion in the error message?Sergio Tulentsev
Show us the full rvm install trace please.Samy Dindane
You'll have to include the first few lines in the make.log file that look like an error..sarnold
Do brew doctor. It might help. Also you could try rbenv instead of rvm, I feel it's easier to installIsmael
@user1446761 the file is not executable, so you have to use something like open '/Users/kerrieyee/.rvm/log/ruby-1.9.3-p194/make.log' to open the file with the default application (probably console)Holger Just

2 Answers

1
votes

I had the same problem and this was resolve by me running the following:

brew update

brew tap homebrew/dupes

brew install apple-gcc42

curl -L https://get.rvm.io | bash -s stable --ruby

0
votes

I can't say for sure that this will solve your specific problem, but this tutorial I wrote has helped a lot of people: http://moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/