簡體   English   中英

使用RVM安裝Ruby時出現問題:rvm安裝1.8.7,rvm安裝1.9.2

[英]Problems installing Ruby with RVM: rvm install 1.8.7, rvm install 1.9.2

我在用rvm安裝ruby時遇到問題。 我當前正在運行Mac OS X 10.6.8。 加載了rvm並重新啟動Terminal后,我運行了以下腳本:

$ rvm get latest 
(rvm update --head returned an error message: "ERROR: rvm update has been removed. See 'rvm get' and rvm 'rubygems' CLI API instead")

$ rvm reload
<RVM reloaded!>

現在我遇到了問題:

$ rvm install 1.8.7 

得到以下回報:

----------------------------------------------------------------------------------------
Installing Ruby from source to: /Users/user/.rvm/rubies/ruby-1.8.7-p352, this may take a while depending on your cpu(s)...

ruby-1.8.7-p352 - #fetching

ruby-1.8.7-p352 - #extracted to /Users/user/.rvm/src/ruby-1.8.7-p352 (already extracted)
Applying patch 'stdout-rouge-fix' (located at /Users/user/.rvm/patches/ruby/1.8.7/stdout-rouge-fix.patch)

ERROR: Error running 'patch -F 25 -p1 -N -f <"/Users/user/.rvm/patches/ruby/1.8.7/stdout-rouge-fix.patch"', please read /Users/user/.rvm/log/ruby-1.8.7-p352/patch.apply.stdout-rouge-fix.log

ruby-1.8.7-p352 - #configuring

ERROR: Error running 'MACOSX_DEPLOYMENT_TARGET=10.6 CFLAGS='-arch x86_64 -g -Os -pipe -no-cpp-precomp' CCFLAGS='-arch x86_64 -g -Os -pipe' CXXFLAGS='-arch x86_64 -g -Os -pipe' LDFLAGS='-arch x86_64 -bind_at_load' LDSHARED='cc -arch x86_64 -dynamiclib -undefined suppress -flat_namespace' ./configure --prefix=/Users/calebballoch/.rvm/rubies/ruby-1.8.7-p352 --enable-shared --disable-install-doc  ', please read /Users/user/.rvm/log/ruby-1.8.7-p352/configure.log

ERROR: There has been an error while running configure. Halting the installation.

此外,當我安裝1.9.2版本時,會遇到類似的問題。

$ rvm install 1.8.7 

哪個返回:

Installing Ruby from source to: /Users/user/.rvm/rubies/ruby-1.9.2-p290, this may take a while depending on your cpu(s)...

ruby-1.9.2-p290 - #fetching 

ruby-1.9.2-p290 - #extracted to /Users/user/.rvm/src/ruby-1.9.2-p290 (already extracted)

Fetching yaml-0.1.4.tar.gz to /Users/user/.rvm/archives

Extracting yaml-0.1.4.tar.gz to /Users/user/.rvm/src

Configuring yaml in /Users/user/.rvm/src/yaml-0.1.4.

ERROR: Error running ' ./configure --prefix="/Users/user/.rvm/usr"  ', please read /Users/user/.rvm/log/ruby-1.9.2-p290/yaml/configure.log

Compiling yaml in /Users/user/.rvm/src/yaml-0.1.4.

ERROR: Error running 'make ', please read /Users/user/.rvm/log/ruby-1.9.2-p290/yaml/make.log
Installing yaml to /Users/user/.rvm/usr

ERROR: Error running 'make install', please read /Users/user/.rvm/log/ruby-1.9.2-p290/yaml/make.install.log

ruby-1.9.2-p290 - #configuring 

ERROR: Error running ' ./configure --prefix=/Users/user/.rvm/rubies/ruby-1.9.2-p290 --enable-shared --disable-install-doc --with-libyaml-dir=/Users/user/.rvm/usr ', please read /Users/user/.rvm/log/ruby-1.9.2-p290/configure.log

ERROR: There has been an error while running configure. Halting the installation.

在我看來,您沒有安裝編譯器或工具。 首先,您是否已安裝make和gcc? 這些隨XCode一起提供,如果您沒有安裝XCode,請先安裝它,然后重試

其他

cat /Users/user/.rvm/log/ruby-1.9.2-p290/yaml/make.install.log

將此輸出粘貼到此處。

暫無
暫無

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

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