rvm install 1.9.3 failing

限于喜欢 提交于 2019-12-03 08:12:40
mattangriffel

It turns out this is a bug in RailsInstaller OSX 1.0.3 - (Found that out while reading Problems installing Ruby on Mountain Lion - ruby 1.9.3 wont' compile)

I needed to change /etc/rvmrc to contain this:

umask g+w
export -a rvm_configure_env
rvm_configure_env=('LDFLAGS=-L/opt/sm/pkg/active/lib' 'CFLAGS=-I/opt/sm/pkg/active/include' 'CPATH=/opt/sm/pkg/active/include')

For more info see: https://github.com/railsinstaller/railsinstaller-nix/issues/10

To get ruby to compile on my mac which is using Mountain Lion and xcode 4.5.2, I have to create a soft link from gcc-4.2 to gcc somewhere on my path. I originally found the suggestion on this page: https://gist.github.com/1860902

Perhaps it will help you:

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

If it doesn't help, you can remove it:

sudo rm /usr/bin/gcc-4.2

Good luck!

mattangriffel's solution did it for me. In my case, my third line was nearly identical but where he had

    rvm_configure_env=('LDFLAGS=-L/opt/sm/pkg/active/lib' 'CFLAGS=-I/opt/sm/pkg/active/include' 'CPATH=/opt/sm/pkg/active/include')

I had

    rvm_configure_env=('LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include')

Fixing mine to look like his did the trick.

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