简体   繁体   中英

Why am I having trouble compiling Ruby 1.9.2 with RVM on Mac OS Lion?

I am having trouble installing Ruby 1.9.2 with rvm on Mac OS Lion.

It gets stuck in the compilation stage; I don't see any errors or output, but it will be stuck at the compilation message for hours upon hours. The miniruby process is still running and using quite a bit of CPU, but it just never finishes.

The only thing I can find in the logs is this message in the make.log :

<internal:prelude>:1: [BUG] Segmentation fault

Any ideas how I can get this to compile?

What version of xcode are you using?

rvm requirements has this little tidbit:

** Lion Users: Xcode Version 4.2.x for OS X Lion works only for ruby 1.9.3-p0 (or higher).
               It currently fails to build several other rubies and gems, as well as several Homebrew and
               Macports packages. Xcode Version 4.1 (4B110) works.

Xcode v4.1 is at: https://developer.apple.com/downloads/download.action?path=Developer_Tools/xcode_4.1_for_lion/xcode_4.1_for_lion.dmg

It's also important to make sure your RVM is current. Run rvm get head to upgrade to the latest version.

It may be related to Lion trying to use llvm to compile instead of gcc. Try running the command like this CC=/usr/bin/gcc-4.2 rvm install 1.9.2 to use gcc.

Based on the information in this other answer: Why can't I install Rails on Lion using RVM?

首先阅读rvm的安装说明,点击对我有帮助的Mac上的RVM的链接

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM