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

问题描述:

我一直在检查其他人的问题,因为有人在安装Ruby和Ruby时遇到问题1.9.3 ,问题似乎与我的等同,所以我尝试提供没有成功的解决方案:无法在OS X Lion中通过rvm安装Ruby 1.9.3甚至使用“--with-gcc = clang”

我第一次尝试: 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.

所以我基本上不知道如何继续呆在这里。任何帮助将不胜感激。提前致谢。

这应该解决这个问题:

rvm get head 
rvm install 1.9.3 --autolibs=4 
+0

非常感谢您的先生。你能否解释一下“--autolibs = 4”呢?我只是很好奇我刚刚做了什么:P – 2013-03-23 16:37:12

+2

here is description => http://bit.ly/rvm-autolibs - 我将使这些标志更具描述性,使用这张票,改变目前的状态 - 大多数当前的4将被删除,并插入新的状态2,但是4是最大的 - 尽你所能 – mpapis 2013-03-23 16:47:48

+0

使用这些命令,我​​得到:搜索二进制红宝石,这可能需要一些时间。 没有二进制红宝石可用于:osx/10.8/x86_64/ruby​​-1.9.3-p392。 继续编译。请阅读'rvm mount'以获取关于二进制红宝石的更多信息。 为osx安装需求可能需要sudo密码。 /Users/alex/.rvm/scripts/functions/build_requirements:第28行:跳过'brew update'确保你的公式是最新的。:找不到命令 – 2013-03-30 05:11:15

安装失败,因为家酿需要保持一定的包装进行更新。在代码的第二行“跳过brew update确保您的公式是最新的。”

brew update 

可能需要

sudo brew update 

然后

rvm install 1.9.3 --with-gcc=clang 

应该重写RVM让您下载红宝石的稳定版本1.9.3

sudo rvm install 1.9.3 --with-gcc=clang 

可能工作以及。