如何在Mac OS X Lion中安装Ruby 1.9.3 ?

时间:2022-11-17 01:07:58

I am trying to install Ruby 1.9.3 but am having problems. I installed RVM, then typed:

我正在尝试安装Ruby 1.9.3,但是遇到了问题。我安装了RVM,然后输入:

rvm install 1.9.3

The output says:

输出说:

ERROR: Error running ' ./configure....

The log says:

日志说:

configure: WARNING: unrecognized options: --with-libyaml-dir 
checking build system type... x86_64-apple-darwin11.2.0 
checking host system type... x86_64-apple-darwin11.2.0 
checking target system type...x86_64-apple-darwin11.2.0 
checking whether the C compiler works... no
configure: error: in `/Users/myuser/.rvm/src/ruby-1.9.3-p0':
configure: error: C compiler cannot create executables See `config.log' for more details

I downloaded the new XCode from the App Store and installed it.

我从应用程序商店下载了新的XCode并安装了它。

11 个解决方案

#1


115  

Try using the clang compiler instead of the default:

尝试使用clang编译器而不是默认:

rvm install 1.9.3 --with-gcc=clang

#2


14  

RVM needs gcc-4.2 to be able to install ruby 1.9.3. Unfortunately Lion does not include anymore gcc-4-2, just the llvm version:

RVM需要gcc-4.2才能安装ruby 1.9.3。不幸的是,Lion不再包含gcc-4-2,只包含llvm版本:

lrwxr-xr-x  1 root  wheel  12 15 feb 17:21 /usr/bin/gcc -> llvm-gcc-4.2

If you have Lion but upgraded from Snow Leopard it is likely that you still have gcc-4.2 If you have a brand new installation of Lion you should download gcc-4.2. I recommned downloading this package.

如果您有Lion,但从雪豹升级,您很可能仍然有gcc-4.2如果您有一个全新的Lion安装,您应该下载gcc-4.2。我建议下载这个软件包。

https://github.com/kennethreitz/osx-gcc-installer

Check that you have gcc-4.2 installed now:

检查您是否已经安装了gcc-4.2:

-rwxr-xr-x  1 root  wheel  113024 16 may  2011 /usr/bin/gcc-4.2
lrwxr-xr-x  1 root  wheel      12 15 feb 17:21 /usr/bin/gcc -> llvm-gcc-4.2

Now you can install ruby 1.9.3 as usual:

现在可以像往常一样安装ruby 1.9.3:

rvm install 1.9.3
rvm use 1.9.3 --default

#3


12  

If you want to merely install and keep up to date the latest version of Ruby (as opposed to switching between different versions of ruby), you can install ruby via homebrew:

如果您只想安装并保持最新版本的Ruby(而不是在不同版本的Ruby之间切换),您可以通过homebrew安装Ruby:

brew install ruby

#4


6  

  1. Open Xcode
  2. 打开Xcode
  3. Open Xcode preferences
  4. 打开Xcode偏好
  5. Open Downloads tab
  6. 打开下载选项卡
  7. Check Command Line Tools
  8. 检查命令行工具

如何在Mac OS X Lion中安装Ruby 1.9.3 ?

#5


5  

Try this first:

试试这个:

rvm get latest

This is what I have working:

这就是我的工作:

  rvm:
    version:      "rvm 1.9.2 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/]"

  ruby:
    interpreter:  "ruby"
    version:      "1.9.3p0"
    date:         "2011-10-30"
    platform:     "x86_64-darwin11.2.0"
    patchlevel:   "2011-10-30 revision 33570"
    full_version: "ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.2.0]"

#6


5  

Actually, ruby-1.9.3-p125 now works with gcc-llvm. But, the current stable/latest releases of rvm do not (yet). But that was just rvm being cautious and there's now a fix to that workaround in the master branch of rvm.

实际上,ruby-1.9.3-p125现在与gcc-llvm一起工作。但是,当前的稳定/最新的rvm版本还没有。但这只是rvm的谨慎,现在rvm的主分支有一个解决方法。

Simply, upgrade rvm to the master branch and install/upgrade ruby:

简单地说,将rvm升级到主分支,并安装/升级ruby:

GT-MBP:~ gthiruva$ rvm upgrade ruby-1.9.3-p0 1.9.3
Are you sure you wish to upgrade from ruby-1.9.3-p0 to     ruby-1.9.3-p125? (Y/n): Y
Installing new ruby ruby-1.9.3-p125
Fetching yaml-0.1.4.tar.gz to /Users/gthiruva/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/gthiruva/.rvm/src
Configuring yaml in /Users/gthiruva/.rvm/src/yaml-0.1.4.
Compiling yaml in /Users/gthiruva/.rvm/src/yaml-0.1.4.
Installing yaml to /Users/gthiruva/.rvm/usr
The autodetected CC(/usr/bin/gcc-4.2) is LLVM based, it is not yet fully supported by
ruby and gems, please read `rvm requirements`, and set CC=/path/to/gcc .
Unable to install ruby ruby-1.9.3-p125.         Please install it manually to continue.
GT-MBP:~ gthiruva$ rvm get head
Original installed RVM version:

rvm 1.10.2 by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis
<mpapis@gmail.com>`enter code here` [https://rvm.beginrescueend.com/]
...
RVM reloaded!
GT-MBP:~ gthiruva$ rvm reload
RVM reloaded!
GT-MBP:~ gthiruva$ exec bash

rvm 1.10.2 by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> 
[https://rvm.beginrescueend.com/]

GT-MBP:~ gthiruva$ rvm upgrade ruby-1.9.3-p0 1.9.3
Are you sure you wish to upgrade from ruby-1.9.3-p0 to     ruby-1.9.3-p125? (Y/n): Y
Installing new ruby ruby-1.9.3-p125
...
Successfully migrated ruby-1.9.3-p0 to ruby-1.9.3-p125
Upgrade complete!

#7


3  

  1. Uninstall/remove all traces of manually installed old ruby versions and extras (sqlite3, libxml2-x.x.x, libxslt-x.x.x) from your /usr/local/ or wherever you installed them.
  2. 卸载/删除手动安装的旧ruby版本和附加组件(sqlite3, libxml2-x.x)的所有痕迹。x、libxsl -x.x.x)来自您的/usr/local/或安装它们的任何地方。
  3. Download and install JewlryBox http://unfiniti.com/software/mac/jewelrybox which is a RVM GUI interface for managing your rubies and gemsets.
  4. 下载并安装JewlryBox http://unfiniti.com/software/mac/jewelrybox是一个用于管理红宝石和宝石的RVM GUI界面。
  5. In JewlryBox, click "Add Ruby" and choose the version of ruby you want to install (I chose 64 bit, Enabled Shared and didn't check/tick the "Use clang" option).
  6. 在JewlryBox中,点击“添加Ruby”,选择你想要安装的Ruby版本(我选择了64位,启用了共享,没有选中/勾选“使用clang”选项)。

Worked with OS X Lion 10.7.3 and Xcode 4.3 Command Line Tools installed.

使用OS X Lion 10.7.3和Xcode 4.3安装命令行工具。

#8


1  

Type following commands

输入以下命令

  • ~ $: source ~/.rvm/scripts/rvm
  • ~ $:源~ / .rvm /脚本/区
  • ~ $: type rvm | head -n 1

    rvm is a function

    区是一个函数

  • ~ $: vi ~/.bash_profile add this line into bash_profile "source ~/.rvm/scripts/rvm"

    ~ $:vi ~ /。bash_profile添加到bash_profile“source ~/.rvm/scripts/rvm”中

  • ~ $: rvm install 1.9.3

    ~ $: rvm安装1.9.3

  • ~ $: rvm use 1.9.3
  • ~ $: rvm使用1.9.3

#9


0  

Clang wasn't cutting any rubies for me and rvm install rubies failed no matter what with single user rvm. Sudo combined with some permission & $PATH changes to my user made it happen. Here's what I did:

Clang没有为我切割任何红宝石和rvm安装红宝石失败了,无论与单一用户rvm。Sudo结合一些权限和对我的用户的$PATH更改使它发生。这是我所做的:

sudo bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )</pre>
sudo rvm pkg install readline
sudo rvm install 1.9.3

Installing rvm from root user makes a shell script at /usr/local/rvm/scripts/rvm Pulled code from this executable and placed it in my .bash_profile so that .bash_profile was saved as:

从root用户安装rvm使shell脚本位于/usr/local/rvm/scripts/rvm从这个可执行文件中提取代码,并将其放在我的.bash_profile中,以便.bash_profile保存为:

[ -s "/usr/local/rvm/scripts/rvm" ]] ;
    true ${rvm_path:="/usr/local/rvm"}
    source "/usr/local/rvm/scripts/rvm"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function

The user group RVM was created during root user rvm install. Last thing I did was go to my preferences pane in OSX 10.7 and added my user to the new rvm group. Finally I reloaded my terminal and was able to install 1.9.3 through rvm single user.

用户组RVM是在根用户RVM安装期间创建的。最后,我进入OSX 10.7中的preferences窗格,并将用户添加到新的rvm组。最后,我重新加载了我的终端,并能够通过rvm单个用户安装1.9.3。

#10


0  

Using rvm, ruby 1.9.3, and attempting to use gcc, I couldn't get Ruby to build cleanly with yaml. While there are a variety of hacks to get yaml compilation to work, none of them seemed to work with rvm. I was troubleshooting late at night and I didn't retain my errors, so I'm working from memory here -- I would appreciate if someone else with a clean environment could test these steps.

使用rvm、ruby 1.9.3,并尝试使用gcc,我无法让ruby用yaml干净地构建。虽然有各种各样的技巧可以让yaml编译工作,但是似乎没有一个是与rvm一起工作的。我在深夜进行故障排除,没有保留我的错误,所以我在这里根据内存工作——如果其他有干净环境的人能够测试这些步骤,我将非常感激。

Using the --with-gcc=clang solution produced the mildly infamous error about the yaml parser:

使用-with-gcc=clang解决方案产生了关于yaml解析器的不太光彩的错误:

It seems your ruby installation is missing psych (for YAML output). To eliminate this warning, please install libyaml and reinstall your ruby. 

Since I need yaml for what I'm going to be doing, and libyaml compiled fine when not being run by rvm, and I even had it installed in /usr/lib after building it by hand, I can't understand why rvm couldn't find and use that version of libyaml, even with the --shared-libs option.

因为我需要yaml我要做什么,和libyaml编译好时不是由数位视讯,我甚至把它安装在特性建立之后,我不太明白为什么rvm libyaml的找不到和使用版本,即使——shared-libs选项。

Using CC=/usr/bin/gcc rvm install 1.9.3 produced errors. In the .rvm/log/ruby-1.9.3-p385/configure.log, I found the following:

使用CC=/usr/bin/gcc rvm安装1.9.3产生的错误。.rvm /日志/ ruby-1.9.3-p385 /配置。log,我发现了以下内容:

configure: error: C compiler cannot create executables
See `config.log' for more details

That error was also present in .rvm/log/libyaml-0.14/configure.log.

这个错误也出现在。rvm/log/libya -0.14/configure.log中。

The solution for me ended up being to run the rvm command with sudo. Running a compile as root seems to remove Apple's GCC toolchain's disapproval of users doing anything as dirty as compiling software.

我的解决方案是使用sudo运行rvm命令。以root身份运行编译似乎可以消除苹果的GCC工具链对用户做任何像编译软件这样肮脏的事情的不满。

So sudo CC=/usr/bin/gcc rvm install 1.9.3 --disable-binary gave me a clean compile of ruby+yaml in the rvm folder. I then needed to sudo chown -R username ~/.rvm && sudo chgrp -R staff ~/.rvm to get things back in my user and running with my permissions.

所以sudo CC=/usr/bin/gcc rvm安装1.9.3——disable-binary给了我一个rvm文件夹中ruby+yaml的干净的编译。然后我需要sudo chown -R用户名~/。rvm && sudo chgrp -R工作人员~/。rvm在我的用户中取回东西并运行我的权限。

I do not recommend compiling things as root, as I see it as a security risk (especially with the vulnerabilities found in the ruby stack and rubygems.org recently) -- but this produced a clean installation of ruby under rvm and might help someone with more talent or time figure out the root cause of the issue with Apple's gcc.

我不推荐编译根,我认为这是一个安全风险(特别是与ruby堆栈中的漏洞和rubygems.org最近)——但这产生一个干净的安装ruby在区和可能帮助别人更多的人才或时间找出问题的根源与苹果的gcc。

#11


-1  

With the new Feb 2012 Command Line Tools for Xcode, using RVM 1.10.3 (and JweleryBox for Mac) Ruby 1.9.3-p125 compiles fine, without "Use clang" and with shared linking and 64 bit architecture. More over, the "gem install rails" command works flawlessly without the warning about libyaml support.

使用新的Xcode命令行工具,使用RVM 1.10.3(和JweleryBox为Mac) Ruby 1.9.3-p125编译良好,没有“使用clang”、共享链接和64位架构。更重要的是,“gem安装rails”命令在没有关于利比亚的支持的警告下完美地工作。

#1


115  

Try using the clang compiler instead of the default:

尝试使用clang编译器而不是默认:

rvm install 1.9.3 --with-gcc=clang

#2


14  

RVM needs gcc-4.2 to be able to install ruby 1.9.3. Unfortunately Lion does not include anymore gcc-4-2, just the llvm version:

RVM需要gcc-4.2才能安装ruby 1.9.3。不幸的是,Lion不再包含gcc-4-2,只包含llvm版本:

lrwxr-xr-x  1 root  wheel  12 15 feb 17:21 /usr/bin/gcc -> llvm-gcc-4.2

If you have Lion but upgraded from Snow Leopard it is likely that you still have gcc-4.2 If you have a brand new installation of Lion you should download gcc-4.2. I recommned downloading this package.

如果您有Lion,但从雪豹升级,您很可能仍然有gcc-4.2如果您有一个全新的Lion安装,您应该下载gcc-4.2。我建议下载这个软件包。

https://github.com/kennethreitz/osx-gcc-installer

Check that you have gcc-4.2 installed now:

检查您是否已经安装了gcc-4.2:

-rwxr-xr-x  1 root  wheel  113024 16 may  2011 /usr/bin/gcc-4.2
lrwxr-xr-x  1 root  wheel      12 15 feb 17:21 /usr/bin/gcc -> llvm-gcc-4.2

Now you can install ruby 1.9.3 as usual:

现在可以像往常一样安装ruby 1.9.3:

rvm install 1.9.3
rvm use 1.9.3 --default

#3


12  

If you want to merely install and keep up to date the latest version of Ruby (as opposed to switching between different versions of ruby), you can install ruby via homebrew:

如果您只想安装并保持最新版本的Ruby(而不是在不同版本的Ruby之间切换),您可以通过homebrew安装Ruby:

brew install ruby

#4


6  

  1. Open Xcode
  2. 打开Xcode
  3. Open Xcode preferences
  4. 打开Xcode偏好
  5. Open Downloads tab
  6. 打开下载选项卡
  7. Check Command Line Tools
  8. 检查命令行工具

如何在Mac OS X Lion中安装Ruby 1.9.3 ?

#5


5  

Try this first:

试试这个:

rvm get latest

This is what I have working:

这就是我的工作:

  rvm:
    version:      "rvm 1.9.2 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/]"

  ruby:
    interpreter:  "ruby"
    version:      "1.9.3p0"
    date:         "2011-10-30"
    platform:     "x86_64-darwin11.2.0"
    patchlevel:   "2011-10-30 revision 33570"
    full_version: "ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.2.0]"

#6


5  

Actually, ruby-1.9.3-p125 now works with gcc-llvm. But, the current stable/latest releases of rvm do not (yet). But that was just rvm being cautious and there's now a fix to that workaround in the master branch of rvm.

实际上,ruby-1.9.3-p125现在与gcc-llvm一起工作。但是,当前的稳定/最新的rvm版本还没有。但这只是rvm的谨慎,现在rvm的主分支有一个解决方法。

Simply, upgrade rvm to the master branch and install/upgrade ruby:

简单地说,将rvm升级到主分支,并安装/升级ruby:

GT-MBP:~ gthiruva$ rvm upgrade ruby-1.9.3-p0 1.9.3
Are you sure you wish to upgrade from ruby-1.9.3-p0 to     ruby-1.9.3-p125? (Y/n): Y
Installing new ruby ruby-1.9.3-p125
Fetching yaml-0.1.4.tar.gz to /Users/gthiruva/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/gthiruva/.rvm/src
Configuring yaml in /Users/gthiruva/.rvm/src/yaml-0.1.4.
Compiling yaml in /Users/gthiruva/.rvm/src/yaml-0.1.4.
Installing yaml to /Users/gthiruva/.rvm/usr
The autodetected CC(/usr/bin/gcc-4.2) is LLVM based, it is not yet fully supported by
ruby and gems, please read `rvm requirements`, and set CC=/path/to/gcc .
Unable to install ruby ruby-1.9.3-p125.         Please install it manually to continue.
GT-MBP:~ gthiruva$ rvm get head
Original installed RVM version:

rvm 1.10.2 by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis
<mpapis@gmail.com>`enter code here` [https://rvm.beginrescueend.com/]
...
RVM reloaded!
GT-MBP:~ gthiruva$ rvm reload
RVM reloaded!
GT-MBP:~ gthiruva$ exec bash

rvm 1.10.2 by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> 
[https://rvm.beginrescueend.com/]

GT-MBP:~ gthiruva$ rvm upgrade ruby-1.9.3-p0 1.9.3
Are you sure you wish to upgrade from ruby-1.9.3-p0 to     ruby-1.9.3-p125? (Y/n): Y
Installing new ruby ruby-1.9.3-p125
...
Successfully migrated ruby-1.9.3-p0 to ruby-1.9.3-p125
Upgrade complete!

#7


3  

  1. Uninstall/remove all traces of manually installed old ruby versions and extras (sqlite3, libxml2-x.x.x, libxslt-x.x.x) from your /usr/local/ or wherever you installed them.
  2. 卸载/删除手动安装的旧ruby版本和附加组件(sqlite3, libxml2-x.x)的所有痕迹。x、libxsl -x.x.x)来自您的/usr/local/或安装它们的任何地方。
  3. Download and install JewlryBox http://unfiniti.com/software/mac/jewelrybox which is a RVM GUI interface for managing your rubies and gemsets.
  4. 下载并安装JewlryBox http://unfiniti.com/software/mac/jewelrybox是一个用于管理红宝石和宝石的RVM GUI界面。
  5. In JewlryBox, click "Add Ruby" and choose the version of ruby you want to install (I chose 64 bit, Enabled Shared and didn't check/tick the "Use clang" option).
  6. 在JewlryBox中,点击“添加Ruby”,选择你想要安装的Ruby版本(我选择了64位,启用了共享,没有选中/勾选“使用clang”选项)。

Worked with OS X Lion 10.7.3 and Xcode 4.3 Command Line Tools installed.

使用OS X Lion 10.7.3和Xcode 4.3安装命令行工具。

#8


1  

Type following commands

输入以下命令

  • ~ $: source ~/.rvm/scripts/rvm
  • ~ $:源~ / .rvm /脚本/区
  • ~ $: type rvm | head -n 1

    rvm is a function

    区是一个函数

  • ~ $: vi ~/.bash_profile add this line into bash_profile "source ~/.rvm/scripts/rvm"

    ~ $:vi ~ /。bash_profile添加到bash_profile“source ~/.rvm/scripts/rvm”中

  • ~ $: rvm install 1.9.3

    ~ $: rvm安装1.9.3

  • ~ $: rvm use 1.9.3
  • ~ $: rvm使用1.9.3

#9


0  

Clang wasn't cutting any rubies for me and rvm install rubies failed no matter what with single user rvm. Sudo combined with some permission & $PATH changes to my user made it happen. Here's what I did:

Clang没有为我切割任何红宝石和rvm安装红宝石失败了,无论与单一用户rvm。Sudo结合一些权限和对我的用户的$PATH更改使它发生。这是我所做的:

sudo bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )</pre>
sudo rvm pkg install readline
sudo rvm install 1.9.3

Installing rvm from root user makes a shell script at /usr/local/rvm/scripts/rvm Pulled code from this executable and placed it in my .bash_profile so that .bash_profile was saved as:

从root用户安装rvm使shell脚本位于/usr/local/rvm/scripts/rvm从这个可执行文件中提取代码,并将其放在我的.bash_profile中,以便.bash_profile保存为:

[ -s "/usr/local/rvm/scripts/rvm" ]] ;
    true ${rvm_path:="/usr/local/rvm"}
    source "/usr/local/rvm/scripts/rvm"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function

The user group RVM was created during root user rvm install. Last thing I did was go to my preferences pane in OSX 10.7 and added my user to the new rvm group. Finally I reloaded my terminal and was able to install 1.9.3 through rvm single user.

用户组RVM是在根用户RVM安装期间创建的。最后,我进入OSX 10.7中的preferences窗格,并将用户添加到新的rvm组。最后,我重新加载了我的终端,并能够通过rvm单个用户安装1.9.3。

#10


0  

Using rvm, ruby 1.9.3, and attempting to use gcc, I couldn't get Ruby to build cleanly with yaml. While there are a variety of hacks to get yaml compilation to work, none of them seemed to work with rvm. I was troubleshooting late at night and I didn't retain my errors, so I'm working from memory here -- I would appreciate if someone else with a clean environment could test these steps.

使用rvm、ruby 1.9.3,并尝试使用gcc,我无法让ruby用yaml干净地构建。虽然有各种各样的技巧可以让yaml编译工作,但是似乎没有一个是与rvm一起工作的。我在深夜进行故障排除,没有保留我的错误,所以我在这里根据内存工作——如果其他有干净环境的人能够测试这些步骤,我将非常感激。

Using the --with-gcc=clang solution produced the mildly infamous error about the yaml parser:

使用-with-gcc=clang解决方案产生了关于yaml解析器的不太光彩的错误:

It seems your ruby installation is missing psych (for YAML output). To eliminate this warning, please install libyaml and reinstall your ruby. 

Since I need yaml for what I'm going to be doing, and libyaml compiled fine when not being run by rvm, and I even had it installed in /usr/lib after building it by hand, I can't understand why rvm couldn't find and use that version of libyaml, even with the --shared-libs option.

因为我需要yaml我要做什么,和libyaml编译好时不是由数位视讯,我甚至把它安装在特性建立之后,我不太明白为什么rvm libyaml的找不到和使用版本,即使——shared-libs选项。

Using CC=/usr/bin/gcc rvm install 1.9.3 produced errors. In the .rvm/log/ruby-1.9.3-p385/configure.log, I found the following:

使用CC=/usr/bin/gcc rvm安装1.9.3产生的错误。.rvm /日志/ ruby-1.9.3-p385 /配置。log,我发现了以下内容:

configure: error: C compiler cannot create executables
See `config.log' for more details

That error was also present in .rvm/log/libyaml-0.14/configure.log.

这个错误也出现在。rvm/log/libya -0.14/configure.log中。

The solution for me ended up being to run the rvm command with sudo. Running a compile as root seems to remove Apple's GCC toolchain's disapproval of users doing anything as dirty as compiling software.

我的解决方案是使用sudo运行rvm命令。以root身份运行编译似乎可以消除苹果的GCC工具链对用户做任何像编译软件这样肮脏的事情的不满。

So sudo CC=/usr/bin/gcc rvm install 1.9.3 --disable-binary gave me a clean compile of ruby+yaml in the rvm folder. I then needed to sudo chown -R username ~/.rvm && sudo chgrp -R staff ~/.rvm to get things back in my user and running with my permissions.

所以sudo CC=/usr/bin/gcc rvm安装1.9.3——disable-binary给了我一个rvm文件夹中ruby+yaml的干净的编译。然后我需要sudo chown -R用户名~/。rvm && sudo chgrp -R工作人员~/。rvm在我的用户中取回东西并运行我的权限。

I do not recommend compiling things as root, as I see it as a security risk (especially with the vulnerabilities found in the ruby stack and rubygems.org recently) -- but this produced a clean installation of ruby under rvm and might help someone with more talent or time figure out the root cause of the issue with Apple's gcc.

我不推荐编译根,我认为这是一个安全风险(特别是与ruby堆栈中的漏洞和rubygems.org最近)——但这产生一个干净的安装ruby在区和可能帮助别人更多的人才或时间找出问题的根源与苹果的gcc。

#11


-1  

With the new Feb 2012 Command Line Tools for Xcode, using RVM 1.10.3 (and JweleryBox for Mac) Ruby 1.9.3-p125 compiles fine, without "Use clang" and with shared linking and 64 bit architecture. More over, the "gem install rails" command works flawlessly without the warning about libyaml support.

使用新的Xcode命令行工具,使用RVM 1.10.3(和JweleryBox为Mac) Ruby 1.9.3-p125编译良好,没有“使用clang”、共享链接和64位架构。更重要的是,“gem安装rails”命令在没有关于利比亚的支持的警告下完美地工作。