不能与RVM在山狮安装Ruby(Can't install Ruby on Mountain

2019-08-04 17:58发布

已经尝试使用RVM在山狮安装Ruby,但得到这个错误信息:

ruby-1.9.3-p362 - #extracted to /usr/local/rvm/src/ruby-1.9.3-p362
ruby-1.9.3-p362 - #configuring
Error running 'env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include ./configure --enable-shared --disable-install-doc --prefix=/usr/local/rvm/rubies/ruby-1.9.3-p362 --with-opt-dir=/usr/local/rvm/usr', please read /usr/local/rvm/log/ruby-1.9.3-p362/configure.log
There has been an error while running configure. Halting the installation.
ruby-1.9.3-p362 is not installed.
Creating alias default for ruby-1.9.3-p362.
Recording alias default for ruby-1.9.3-p362.
Creating default links/files
ruby-1.9.3-p362 is not installed.
Could not load ruby ruby-1.9.3-p362.
/usr/local/rvm/scripts/alias: line 111: /usr/local/rvm/rubies/ruby-1.9.3-p362/bin/ruby: No such file or directory

我能做些什么,以获得正确的安装的红宝石工作? 还安装了自制软件包管理器; 有没有冲突?

提前致谢。

Answer 1:

这可能是由于这样的事实,最近的OS X版本的使用,而不是默认的GCC编译器的LLVM。

试试这个:

brew update
brew tap homebrew/dupes
brew install apple-gcc42

安装GCC编译器。 然后:

rvm install 1.9.3 --with-gcc=clang`

编辑:如果前面的解决方案不起作用,尝试运行前给出以下一试rvm install 1.9.3

export CC=/usr/local/bin/gcc-4.2

编辑2:下面GitHub的页面列出的问题和多种解决方案,加入到这个职位的文件目的: 安装提示RVM /的Ruby on OSX 10.8山狮



Answer 2:

这对正是你需要做详细的说明。

RVM不断在MAC设置红宝石1.8.7,而不是1.9的最新版本



文章来源: Can't install Ruby on Mountain Lion with rvm