Error installing 1.9.3 with RVM on Lion

2019-06-21 18:08发布

I have burned an embarrassing number of hours trying to install ruby and rails on Mac. I am using Lion 10.7.2, Xcode 4.2.1, rvm 1.10.0, and gcc 4.2.1 Does anyone have a surefire way to install ruby with rvm. Or, is there

rvm install 1.9.2 -C --with-readline-dir=$rvm_path/usr --with-iconv-dir=$rvm_path/usr

Produces the error

make[1]: *** [../../.ext/x86_64-darwin11.2.0/tcltklib.bundle] Error 1
make: *** [mkmain.sh] Error 1

Running

rvm install 1.9.3-p0  --with-gcc=clang  

Produces the error

make: *** [.rbconfig.time] Abort trap: 6

Simply running

rvm install 1.9.3

Produces the error

make[2]: *** [../../.ext/x86_64-darwin11.2.0/tcltklib.bundle] Error 1
make[1]: *** [ext/tk/all] Error 2
make: *** [build-ext] Error 2

From reading this, I ran the below in the Terminal and my Mac would not restart until I put the libiconv.2.dylib back in place using Target Disk Mode.

rm /usr/local/lib/libiconv.2.dylib
ln -s /usr/lib/libiconv.2.dylib /usr/local/lib/libiconv.2.dylib

From this link, I also removed a previous install of Macfuse which is known to cause problems

I have reinstalled Xcode twice [Install Xcode from the Application Folder].

Is there another way to get Ruby Installed on Lion? Many thanks as I'm fast running out of ideas
Graham

7条回答
戒情不戒烟
2楼-- · 2019-06-21 18:38

The following worked for me:

rvm pkg install iconv
rvm pkg install readline  
rvm remove 1.9.3
rvm install 1.9.3 --with-iconv-dir=$rvm_path/usr --with-readline-dir=$rvm_path/usr

source: http://blog.merjis.com/2011/12/18/rails-3-1-ruby-1-9-3-lion-xcode-4-1/

查看更多
Deceive 欺骗
3楼-- · 2019-06-21 18:44

I had this problem too and tried several of the listed solutions unsuccessfully. Then I downloaded XCode 4.3.1 for Lion and the Xcode command line tools update (dated March 7, 2012) from Apple's developer site and just re-ran 'rvm install 1.9.3'. Worked perfectly and installed 1.9.3p125.

Hope this helps

查看更多
混吃等死
4楼-- · 2019-06-21 18:44

Note that RVM itself tells you that it won't work with XCode 4.2:

** Lion Users: DO NOT use Xcode Version 4.2.x for OS X Lion. It currently fails to build several rubies and gems, as well as several Homebrew and Macports packages as well. Xcode Version 4.1 (4B110) works.

You can see this warning again by calling rvm requirements.

The simplest (albeit slow) way to fix the problem is to remove XCode 4.2 and download and install XCode 4.1. You can also apparently fix it with a separate gcc-4.2 installation, but I don't know the details of how you'd do that.

For more detail, see the full discussion on the rvm github tracker

查看更多
ゆ 、 Hurt°
5楼-- · 2019-06-21 18:45

I was finally able to install ruby by using macports and Xcode 4.2.1. Had to abandon rvm.

port install ruby19 +nosuffix

Thanks for all of the answers and help :)

查看更多
我命由我不由天
6楼-- · 2019-06-21 18:47

The following worked for me:

$ rvm install 1.9.3 --with-gcc=clang

I got that from this page.

查看更多
爷、活的狠高调
7楼-- · 2019-06-21 18:48

You need to force autoconf.

rvm install 1.9.3 --force-autoconf

查看更多
登录 后发表回答