在我全新安装的Mountain Lion上安装Ruby 1.8.7时遇到了很多麻烦。我在Stack Overflow上看了看,没有看到任何专门解决这个问题的东西,希望有人以前遇到过这个问题。
我使用的是可以用Xcode下载的命令行工具
我通过RVM和HomeBrew安装Ruby1.9.3时没有遇到任何问题。当我尝试安装1.8.7时,在它尝试编译后得到以下消息:
我首先运行了这个命令
rvm install 1.8.7
这给了我这个错误
The provided compiler '/usr/bin/gcc' is LLVM based, it is not yet fully supported by ruby and gems, please read `rvm requirements`.
在深入挖掘了一下之后,我试着
rvm install 1.8.7 --with-gcc=clang
Error running 'make ', please read /Users/paulzaich/.rvm/log/ruby-1.8.7-p370/make.log
There has been an error while running make. Halting the installation.
Ruby 'ruby-1.8.7-p370' was built using clang - but it's not (fully) supported, expect errors.
Please be aware that you just installed a ruby that requires 2 patches just to be compiled on up to date linux system.
This may have known and unaccounted for security vulnerabilities.
Please consider upgrading to Ruby 1.9.3-194 which will have all of the latest security patches.
在这一点上,我做了更多的搜索,发现了一些关于需要编译我自己的readline的东西。RVM Does Not Install Ruby 1.9.2 on Snow Leopard: 'Error running 'make '
不幸的是,这似乎破坏了我的整个rvm安装,包括1.9.3。我尝试重新安装1.9.3,得到的错误与我在1.8.7中得到的错误相同。此时,我完全删除了RVM并重新安装。再次安装1.9.3没有问题。
我也尝试了基于这篇文章的RVM issue with Mountain Lion更新所有版本的rvm。也没什么好运气的。
更新:我也尝试过使用REE1.8.7的this walkthrough,它建议安装gcc-4.2。不幸的是没有运气。
更新2: i参考了rvm要求并安装了以下软件包
brew update
brew tap homebrew/dupes
brew install autoconf automake apple-gcc42
rvm pkg install openssl
到目前一切尚好。然后,我在需要引用GCC编译器时引用了this post。我确定引用的链接可能不正确,因为我使用的是自制软件?我在我的Cellar文件夹中找到了编译器,并使用了以下命令
CC=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 rvm install 1.8.7
不走运。与之前相同的错误消息。
https://stackoverflow.com/questions/12469530
复制相似问题