Problem installing Ruby 1.9.2 on Mac OS Lion

放肆的年华 提交于 2019-12-01 05:13:35

Make sure you have the latest xcode available (you'll need to update it if you're running a copy from snow leopard. Update RVM rvm get head and then try again.

I had problems compiling ree but 1.9.2 worked fine, you can try adding this function to .profile in your home directory, it'll compile with gcc (instead of the default LLVM)

# using_gcc for 64btt compiling on lion (solves compatability issues)
function using_gcc() {
  env CC="/usr/bin/gcc-4.2" ARCHFLAGS="-arch x86_64" ARCHS="x86_64" $*
}

Then run using_gcc rvm install 1.9.2

Shwanton

If you're running a fresh copy of Lion & Xcode 4.2, you're going to need to install the GCC 4.2 dev libraries first - they aren't included in a fresh Xcode 4.2 install.

Then pass the CC="/usr/bin/gcc-4.2" flag when installing your rvm.

Be sure to rvm remove any previous installation attempts first.

If you want to get rvm install ree with ruby 1.8.7 to work, this solved the problem for me:

# using_gcc for 32btt compiling on lion (solves compatability issues)
function using_gcc() {
  env CC="/usr/bin/gcc-4.2" ARCHFLAGS="-arch x86_32" ARCHS="x86_32" $*
}

#then

using_gcc rvm install ree

Basically just changing "64" to "32" in the other answer.

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