无法在OS X Lion中通过rvm安装Ruby 1.9.3,即使使用“--with-gcc = clang”

时间:2013-03-23 13:28:24

标签: osx-lion rvm ruby-1.9.3

我一直在检查这里的其他问题,因为在使用RVM的Lion中安装ruby 1.9.3时出现问题,问题似乎与我的相同,所以我尝试了解决方案但没有成功:

我首先尝试过: rvm install 1.9.3 --with-gcc=clang

返回: Installing requirements for osx/10.7/x86_64, might require sudo password. Skipping `brew update` make sure your formulas are up to date. Missing required packages: libtool, pkg-config, libyaml, readline, libxml2, libxslt, openssl, sqlite. requirements_brew_generate_openssl_cert:4: no such file or directory: /usr/local/Cellar/openssl/1.0.1e/bin/openssl Skipping update of certificates in '/cert.pem'. Warning: found user selected compiler 'clang', this will suppress RVM auto detection mechanisms. Installing Ruby from source to: /Users/****/.rvm/rubies/ruby-1.9.3-p392, this may take a while depending on your cpu(s)... ruby-1.9.3-p392 - #downloading ruby-1.9.3-p392, this may take a while depending on your connection... ruby-1.9.3-p392 - #extracted to /Users/****/.rvm/src/ruby-1.9.3-p392 (already extracted) ruby-1.9.3-p392 - #configuring................................................................................................................................................................................................................................................................................................................................................................................................................................................................. ruby-1.9.3-p392 - #compiling................ ruby-1.9.3-p392 - #installing .............. ruby-1.9.3-p392 is not installed. To install do: 'rvm install ruby-1.9.3-p392'

注意ruby-1.9.3-p392 is not installed.在结尾附近的显示方式。

之后我尝试按照以下建议做了以下事情: CC=/usr/bin/gcc-4.2 rvm install 1.9.3 --enable-shared

但它回来了: You requested building with '/usr/bin/gcc-4.2' but it is not in your path.

所以我基本上被困在这里,不知道如何继续。任何帮助将受到高度赞赏。提前谢谢。

2 个答案:

答案 0 :(得分:8)

这应解决它:

rvm get head
rvm install 1.9.3 --autolibs=4

答案 1 :(得分:0)

安装失败,因为Homebrew维护的某些软件包需要更新。在代码的第二行“跳过brew update,确保您的公式是最新的。”

brew update

可能需要

sudo brew update

然后

rvm install 1.9.3 --with-gcc=clang

应该覆盖rvm,允许您下载稳定版本的ruby 1.9.3

sudo rvm install 1.9.3 --with-gcc=clang

也可以。