簡體   English   中英

RVM無法安裝不同版本的Ruby

[英]RVM not able to install different versions of Ruby

我一直遵循http://beginrescueend.com/rvm/install/http://beginrescueend.com/rvm/basics/上的所有說明

在終端中,我可以輸入“ rvm類型”,並說“ rvm是一個函數”,因此應該已經正確安裝了。

現在,當我輸入類似內容時:rvm install ruby​​-1.9.2-p318,rvm install 1.9.2或其他似乎在運行安裝過程的程序出現以下錯誤

Error running 'make ', please read /Users/Nick/.rvm/log/ruby-1.9.2-p318/yaml/make.log
Error running ' ./configure --prefix=/Users/Nick/.rvm/rubies/ruby-1.9.2-p318 --enable-shared --disable-install-doc --with-libyaml --with-opt-dir=/Users/Nick/.rvm/usr ', please read /Users/Nick/.rvm/log/ruby-1.9.2-p318/configure.log
There has been an error while running configure. Halting the installation.
ls: /Users/Nick/.rvm/rubies/*/bin/ruby: No such file or directory

所以我打開了install.log文件,它說:

configure: error: in `/Users/Nick/.rvm/src/yaml-0.1.4':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details

沒有config.log文件。

您需要一個C編譯器,並且似乎沒有安裝C編譯器,或者它不在您的路徑上。 XCode提供了一個,您已經安裝了嗎?

檢查這個類似的問題Xcode-配置:錯誤:在$ PATH中找不到可接受的C編譯器

看起來您需要安裝Xcode命令行工具,因此可以在安裝時編譯RVM。 我相信只要安裝Xcode就能做到。

只是一個旁注:即使安裝了XCode,也可能會遇到類似的問題。 解決方案在這里: 無法在帶有RVM的Lion下安裝Ruby – GCC問題

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM