无法使用RVM安装ruby。数据库文件不存在?

时间:2012-04-27 02:19:52

标签: ruby configuration rvm

在第一步遇到大问题。我安装了RVM,然后键入“rvm install 1.9.3”,这是输出:

David-Coles-MacBook-Air:~ DavesPiece$ rvm install 1.9.3
Fetching yaml-0.1.4.tar.gz to /Users/DavesPiece/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/DavesPiece/.rvm/src
Configuring yaml in /Users/DavesPiece/.rvm/src/yaml-0.1.4.
Error running ' ./configure --prefix="/Users/DavesPiece/.rvm/usr"  ', please read /Users/DavesPiece/.rvm/log/ruby-1.9.3-p194/yaml/configure.log
Compiling yaml in /Users/DavesPiece/.rvm/src/yaml-0.1.4.
Error running 'make ', please read /Users/DavesPiece/.rvm/log/ruby-1.9.3-p194/yaml/make.log


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

Installing Ruby from source to: /Users/DavesPiece/.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/DavesPiece/.rvm/src/ruby-1.9.3-p194 (already extracted)
ruby-1.9.3-p194 - #configuring 
Error running ' ./configure --prefix=/Users/DavesPiece/.rvm/rubies/ruby-1.9.3-p194 --enable-shared --disable-install-doc --with-libyaml --with-opt-dir=/Users/DavesPiece/.rvm/usr ', please read /Users/DavesPiece/.rvm/log/ruby-1.9.3-p194/configure.log
There has been an error while running configure. Halting the installation.
ls: /Users/DavesPiece/.rvm/rubies/*/bin/ruby: No such file or directory
David-Coles-MacBook-Air:~ DavesPiece$ 

我去看了它提到的日志文件但是没有任何结果。知道我应该怎么做吗?我几乎用Google搜索了我的脸,无法找到解决方案。

3 个答案:

答案 0 :(得分:1)

这看起来很可疑,你是如何安装RVM的?

最简单的解决方案是:

touch /Users/DavesPiece/.rvm/config/packages

答案 1 :(得分:0)

如果您没有Xcode,则需要安装它。如果您有Lion 10.7.3或更高版本,您可以在App Store中找到它。否则,您需要访问Apple Developer站点(需要帐户)以查找下载和安装它的说明。

此外,如果您使用Lion,则可能需要下载并安装GCC-10.7-v2.pkg。如果您看到有关编译器基于LLVM的消息,则可能需要使用此命令: CC = / usr / bin / gcc-4.2 rvm install 1.9.2-p290 --enable-shared

如果没有看到你的configure.log,这只是一个最好的猜测。

答案 2 :(得分:0)