Getting Ruby 1.8.7 installed on Mountain Lion (10.8)

无人久伴 提交于 2019-11-30 00:23:05
Paul

I just figured it out! Please reference this question on SO

rvm can no longer install 1.8.7-p352 on Mac OS X Mountain Lion

rvm reinstall 1.8.7 --without-tcl --without-tk

Alternatively, try this installation order if you have Homebrew.

brew install tcl-tk

rvm reinstall 1.8.7
brock

Just to follow up to Paul's post. I'm running OSX 10.8.2, had 1.9.3 install without issues, but 1.8.7-p370 also failed. I symlinked gcc-4.2:

sudo ln -s /usr/local/bin/gcc-4.2 /usr/bin/gcc-4.2

...successfully ran:

brew install tcl

...but tk failed:

brewk install tk

If you're in the same spot, this command did the trick:

CC=/usr/local/bin/gcc-4.2 rvm reinstall 1.8.7 --without-tk

Latest Xcode provides only clang - not GNU gcc, you need to install gcc-4.2 to be able to compile Ruby 1.8.7 properly, following command will show available options:

rvm requirements

currently only ruby 1.9.3-p125 and later has limited support for clang, but this is limited support, and still errors can be found.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!