RVM无法在OS x 10.9上安装Ruby

时间:2014-03-22 13:10:47

标签: ruby-on-rails ruby macos rvm

我正在尝试使用RVM在我的OS X Mavericks笔记本电脑上安装Ruby和Rails。我跑的时候:

  

rvm要求

我遇到了:

Checking requirements for osx.
Installing requirements for osx.
Updating system..jeffwomble password required for 'port -dv selfupdate': 
........
Error running 'requirements_osx_port_update_system ',
showing last 15 lines of /Users/jeffwomble/.rvm/log/1395493335/update_system.log
checking for xcode-select... /usr/bin/xcode-select
checking Mac OS X version... 10.9.2
checking Xcode location... /Applications/Xcode.app/Contents/Developer/
checking for gcc... /usr/bin/llvm-gcc-4.2
checking whether the C compiler works... no
configure: error: in `/opt/local/var/macports/sources/rsync.macports.org/release/base':
configure: error: C compiler cannot create executables
See `config.log' for more details
shell command "cd /opt/local/var/macports/sources/rsync.macports.org/release/base && CC=/usr/bin/llvm-gcc-4.2 ./configure --prefix=/opt/local --with-tclpackage=/Library/Tcl --with-install-user=root --with-install-group=admin --with-directory-mode=0755 --enable-readline && make && make install" returned error 77
DEBUG: Error installing new MacPorts base: shell command failed (see log for details)
    while executing
"macports::selfupdate [array get global_options] base_updated"
Error: /opt/local/bin/port: port selfupdate failed: Error installing new MacPorts base: shell command failed (see log for details)
+ return 1
+ return 1
Requirements installation failed with status: 1.

我已经安装了最新版本的Xcode。我试图跑:

  

Xcode-select --install

但我被告知命令行工具在服务器上不可用。

我注意到这一行:

checking for gcc... /usr/bin/llvm-gcc-4.2

但我认为该文件应为/ usr / bin / llvm-gcc

我需要做什么?

2 个答案:

答案 0 :(得分:0)

在尝试使用符号链接之前,我尝试从命令行运行mac端口。我收到了'-bash:port:command not found'错误。我手动下载并安装了macports,之后一切都运行良好。

答案 1 :(得分:0)

首先安装HomeBrew,然后运行:

rvm要求

在Mac OS Mavericks上为我工作。 (提示表格How install ruby 2.1.0 on OS_X 10.9 using rvm? ( No binary rubies available for: osx/10.9/x86_64/ruby )