When I try to install Ruby 1.9.2 on Snow Leopard using:
rvm install 1.9.2
I get the following:
ERROR: Error running 'make ', please read /Users/mary/.rvm/log/ruby-1.9.2-p180/make.log
ERROR: There has been an error while running make. Halting the installation.
So, I check out make.log. The end of it reads:
readline.c: In function ‘username_completion_proc_call’:
readline.c:1386: error: ‘username_completion_function’ undeclared (first use in this
function)
readline.c:1386: error: (Each undeclared identifier is reported only once
readline.c:1386: error: for each function it appears in.)
make[1]: *** [readline.o] Error 1
make: *** [mkmain.sh] Error 1
I have consulted other answers to this question, and done everything suggested there:
- XCode is installed.
The end of my .bash_profile has the following line added to it:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
I have tried updating readline, but no matter what, I continue to get the error message about running 'make.'
The output of rvm info is the following:
system:
system:
uname: "Darwin mary-nunans-computer.local 10.6.0 Darwin Kernel Version 10.6.0: Wed Nov 10 18:13:17 PST 2010; root:xnu-1504.9.26~3/RELEASE_I386 i386"
bash: "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)"
zsh: "/bin/zsh => zsh 4.3.9 (i386-apple-darwin10.0)"
rvm:
version: "rvm 1.6.2 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/]"
homes:
gem: "not set"
ruby: "not set"
binaries:
ruby: "/usr/local/bin/ruby"
irb: "/usr/local/bin/irb"
gem: "/usr/local/bin/gem"
rake: "/usr/local/bin/rake"
environment:
PATH: "/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin:/usr/X11/bin:/Users/mary/.rvm/bin:/Users/mary/.rvm/bin"
GEM_HOME: ""
GEM_PATH: ""
MY_RUBY_HOME: ""
IRBRC: ""
RUBYOPT: ""
gemset: ""
Any suggestions would be appreciated.
Compile and install your own readline:
Remove the ruby:
rvm remove 1.9.2
Install it again:
rvm install 1.9.2
(You might need to add source it if local path is not in your directory:
rvm install 1.9.1 -C --with-readline-dir=/usr/local/
That should do it.
------------- EDIT --------------
As noted in the comment below, if you use homebrew, then you should
brew install readline
. And if you're using a Mac, you should be using homebrew.------------ HOW TO COMPILE READLINE ON 10.7 ---------
"readline-6.2 has not been updated for Mac OS X 10.7 (darwin11), so open the support/shobj-conf and change darwin10 to darwin11 in the two places where it appears."
Source: lamboy
You have to install developer tools. You can download Xcode (the developer tools comes with it) for 5 dollars at the mac app store.
I had the same problem and the answer in the post Getting error for libxml2.2.dylib "file is not of required architecture") finally helped me resolve it.
I'm pasting the output of 'rvm notes' here as this matters directly. You need at least Xcode 3.2.1 (1613). Please note that Snow Leopard was the firs to have this revision so you'll need to grab the updated Xcode.
∴ rvm notes
As of this writing the current RVM is 1.8.3, the required Xcode is minimally 3.2.1, and you can use either the readline in Homebrew, RVM's 'rvm pkg install readline' or Lion's built-in readline (though there have been significant reports of that failing).
You would pass that info in as shown on the site.