如何在升级ruby期间解决这些错误?

时间:2012-06-14 04:31:44

标签: ruby osx-lion upgrade

Fetching yaml-0.1.4.tar.gz to /Users/dmonkeys/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/dmonkeys/.rvm/src
Error running 'tar xmzf /Users/dmonkeys/.rvm/archives/yaml-0.1.4.tar.gz -C /Users/dmonkeys/.rvm/src ', please read /Users/dmonkeys/.rvm/log/ruby-1.9.3-p194/yaml/extract.log
Configuring yaml in /Users/dmonkeys/.rvm/src/yaml-0.1.4.
Error running ' ./configure --prefix="/Users/dmonkeys/.rvm/usr"  ', please read     /Users/dmonkeys/.rvm/log/ruby-1.9.3-p194/yaml/configure.log
Compiling yaml in /Users/dmonkeys/.rvm/src/yaml-0.1.4.
Error running 'make  -j2', please read /Users/dmonkeys/.rvm/log/ruby-1.9.3-p194/yaml/make.log

Database file /Users/dmonkeys/.rvm/config/packages does not exist.

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

ruby-1.9.3-p194 - #fetching 
ruby-1.9.3-p194 - #extracted to /Users/dmonkeys/.rvm/src/ruby-1.9.3-p194 (already extracted)
ruby-1.9.3-p194 - #configuring 
Error running ' ./configure --prefix=/Users/dmonkeys/.rvm/rubies/ruby-1.9.3-p194 --enable-shared --disable-install-doc --with-libyaml --with-opt-dir=/Users/dmonkeys/.rvm/usr ', please read /Users/dmonkeys/.rvm/log/ruby-1.9.3-p194/configure.log
There has been an error while running configure. Halting the installation.
ruby-1.9.3-p194 is not installed.
Creating alias default for ruby-1.9.3-p194.
Recording alias default for ruby-1.9.3-p194.
Creating default links/files
ruby-1.9.3-p194 is not installed.
Could not load ruby ruby-1.9.3-p194.
/Users/dmonkeys/.rvm/scripts/alias: line 133: /Users/dmonkeys/.rvm/rubies/ruby-1.9.3-p194/bin/ruby: No such file or directory

1 个答案:

答案 0 :(得分:2)

确保安装了Xcode“Command Line Tools”软件包。单凭Xcode已经不够了。

您可以单独下载或在管理器中启用该程序包来完成此操作。

这是安装失败的最常见情况。您没有发布您粘贴的输出中提到的日志内容。