无法在更新的OS X Mavericks上安装Ruby

无法在更新的OS X Mavericks上安装Ruby,ruby,xcode,osx-mavericks,ruby-1.9,Ruby,Xcode,Osx Mavericks,Ruby 1.9,我正在尝试安装Ruby 1.9.2,这样我就可以参加Ruby的在线课程。我刚刚通过OSX升级到Mavericks 10.9.1,这样我就可以安装最新版本的XCode 5.0.2,现在也已经安装了 我肯定我在这里错过了一些基本的东西。有人能看一下我的终端安装日志和错误信息吗?我很感激你的任何想法 dave-morans-macbook:~ davemoran$ rvm install 1.9.2 Searching for binary rubies, this might take some t

我正在尝试安装Ruby 1.9.2,这样我就可以参加Ruby的在线课程。我刚刚通过OSX升级到Mavericks 10.9.1,这样我就可以安装最新版本的XCode 5.0.2,现在也已经安装了

我肯定我在这里错过了一些基本的东西。有人能看一下我的终端安装日志和错误信息吗?我很感激你的任何想法

dave-morans-macbook:~ davemoran$ rvm install 1.9.2
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.9/x86_64/ruby-1.9.2-p320.
It is not possible to build movable binaries for rubies 1.8-1.9.2, but you can do it for your system only.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Installing macports...
Error running 'requirements_osx_port_install_port',
showing last 15 lines of /Users/davemoran/.rvm/log/1389714845_ruby-1.9.2-p320/port_install.log
checking build system type... i386-apple-darwin13.0.0
checking host system type... i386-apple-darwin13.0.0
checking target system type... i386-apple-darwin13.0.0
checking MacPorts version... 2.2.1
checking for sw_vers... /usr/bin/sw_vers
checking for defaults... /usr/bin/defaults
checking for xcode-select... /usr/bin/xcode-select
checking Mac OS X version... 10.9.1
checking Xcode location... /Applications/Xcode.app/Contents/Developer
checking Xcode version... 5.0.2
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/Users/davemoran/.rvm/src/MacPorts-2.2.1':
configure: error: C compiler cannot create executables
See `config.log' for more details
Requirements installation failed with status: 77.

您需要为Xcode安装命令行工具


您还可以尝试将-with gcc=gcc-4.2添加到上述rvm命令的末尾。

您需要安装用于Xcode的命令行工具


您还可以尝试将-with gcc=gcc-4.2添加到上述rvm命令的末尾。

您可能缺少用于Xcode的命令行工具。您可以从Xcode->Preferences->Downloads安装它们,或者使用Xcode选择-install命令行安装它们


请在安装命令行工具后尝试rvm安装。

您可能缺少用于Xcode的命令行工具。您可以从Xcode->Preferences->Downloads安装它们,或者使用Xcode选择-install命令行安装它们


安装命令行工具后,请尝试rvm安装。

在OSX Mavericks上安装旧版ruby 2.0.0p247时,我遇到了相同的错误,这就是我的工作原理:

$ rvm install 2.0.0-p247 --with-readline-dir=$rvm_path/usr --with-openssl-dir=$rvm_path/usr --disable-binary  --with-gcc=gcc-4.2
嗯,,
Florin.

我在OSX Mavericks上安装旧版ruby 2.0.0p247时也遇到了同样的错误,这就是我的工作原理:

$ rvm install 2.0.0-p247 --with-readline-dir=$rvm_path/usr --with-openssl-dir=$rvm_path/usr --disable-binary  --with-gcc=gcc-4.2
嗯,,
Florin.

这就是我最终在OSX 10.9.3和Xcode 5.1.1 5B1008上工作的原因

rvm install 1.9.3 --with-gcc=/Applications/Xcode.app/Contents/Developer/usr/bin/gcc
编辑:还可以使用其他选项补充上述命令。我从先前失败安装的命令输出中提取了这些选项

rvm install 1.9.3 --with-gcc=/Applications/Xcode.app/Contents/Developer/usr/bin/gcc --with-opt-dir=/usr/local/Cellar/libyaml/0.1.6:/usr/local/Cellar/readline/6.3.6:/usr/local/Cellar/libksba/1.3.0:/usr/local/opt/openssl --without-tcl --without-tk --disable-install-doc --enable-shared 

这就是我最终在OSX 10.9.3和Xcode 5.1.1 5B1008上工作的原因

rvm install 1.9.3 --with-gcc=/Applications/Xcode.app/Contents/Developer/usr/bin/gcc
编辑:还可以使用其他选项补充上述命令。我从先前失败安装的命令输出中提取了这些选项

rvm install 1.9.3 --with-gcc=/Applications/Xcode.app/Contents/Developer/usr/bin/gcc --with-opt-dir=/usr/local/Cellar/libyaml/0.1.6:/usr/local/Cellar/readline/6.3.6:/usr/local/Cellar/libksba/1.3.0:/usr/local/opt/openssl --without-tcl --without-tk --disable-install-doc --enable-shared 

非常感谢。当我查看Xcode本身的下载首选项窗格时,没有可用的命令行工具下载,所以我尝试按照您的建议进行操作,xammy,并直接从终端中的命令行开始。一切都正常启动,我同意Xcode中的条款,然后在命令行开发人员工具安装程序中收到以下错误消息:无法安装软件,因为软件更新服务器当前不提供该软件。Xcode 5.2和命令行工具似乎存在一些问题。因此,虽然他们可能已经安装了所需的组件,但仍然会显示该错误。你能分享gcc版本的输出吗?我也看到了这个基于LLVM3.3SVN的苹果LLVM版本5.0-500.2.79谢谢。当我查看Xcode本身的下载首选项窗格时,没有可用的命令行工具下载,所以我尝试按照您的建议进行操作,xammy,并直接从终端中的命令行开始。一切都正常启动,我同意Xcode中的条款,然后在命令行开发人员工具安装程序中收到以下错误消息:无法安装软件,因为软件更新服务器当前不提供该软件。Xcode 5.2和命令行工具似乎存在一些问题。因此,虽然他们可能已经安装了所需的组件,但仍然会显示该错误。你能分享gcc-version的输出吗?我也看到了这个基于LLVM 3.3SVN的Apple LLVM版本5.0 clang-500.2.79。我试过这样做:rvm安装1.9.2-with gcc=gcc-4.2,结果是:你要求使用“gcc-4.2”构建,但它不在你的路径中。我再次猜测我可能输入了错误的命令。我这样尝试:rvm install 1.9.2-with gcc=gcc-4.2,结果是:您请求使用“gcc-4.2”进行构建,但它不在您的路径中。我再次猜测我可能输入了错误的命令