[英]Getting Ruby 1.8.7 installed on Mountain Lion (10.8)
我在山獅的干凈安裝上安裝Ruby 1.8.7時遇到了很多麻煩。 我查看了Stack Overflow並沒有看到任何專門解決此問題的內容,並希望有人可能之前遇到過此問題。
我正在使用可以使用Xcode下載的命令行工具
通過RVM和HomeBrew安裝Ruby 1.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無法在Snow Leopard上安裝Ruby 1.9.2:'運行'make'時出錯
不幸的是,這似乎破壞了我的整個rvm安裝,包括1.9.3。 我嘗試重新安裝1.9.3並得到了與1.8.7相同的錯誤。 我此時完全刪除了RVM並重新安裝。 沒有問題再次安裝1.9.3。
我還嘗試使用Mountain Lion更新所有版本的rvm。 也沒有運氣。
更新:我還嘗試使用REE 1.8.7的演練 ,建議安裝gcc-4.2。 不幸的是沒有運氣。
更新2:我參考了rvm要求並安裝了以下軟件包
brew update
brew tap homebrew/dupes
brew install autoconf automake apple-gcc42
rvm pkg install openssl
到現在為止還挺好。 然后我引用了這篇關於需要引用GCC編譯器的帖子 。 我確定引用的鏈接可能不正確,因為我正在使用自制軟件? 我在Cellar文件夾中找到了編譯器並使用了以下命令
CC=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 rvm install 1.8.7
沒運氣。 與以前相同的錯誤消息。
我只想出來了! 請在SO上參考這個問題
rvm無法再在Mac OS X Mountain Lion上安裝1.8.7-p352
rvm reinstall 1.8.7 --without-tcl --without-tk
或者,如果您有自制軟件,請嘗試此安裝順序。
brew install tcl-tk
rvm reinstall 1.8.7
最新的Xcode只提供了clang
- 而不是GNU gcc
,你需要安裝gcc-4.2
才能正確編譯Ruby 1.8.7,以下命令將顯示可用的選項:
rvm requirements
目前只有ruby 1.9.3-p125以及后來對clang
支持有限,但這是有限的支持,仍然可以找到錯誤。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.