2014-03-12 26 views
3

我試圖安裝紅寶石1.9.3-p545或ruby-2.1.0或ruby-2.1.1,但它失敗了......如何使用rvm在OS_X 10.9上安裝ruby 2.1.0? (沒有二進制紅寶石可用於:osx/10.9/x86_64/ruby​​)

我的環境:

  • OS_X 10.9 x86_64的
  • RVM 20年1月25日

從終端錯誤:

 

bmalets$ rvm install 1.9.3-p545 
Searching for binary rubies, this might take some time. 
No binary rubies available for: osx/10.9/x86_64/ruby-1.9.3-p545. 
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies. 
Checking requirements for osx_port. 
Installing macports......................................................bmalets password required for 'make install': 
...................... 
Installing requirements for osx_port. 
Updating system............ 
Error running 'requirements_osx_port_update_system ruby-1.9.3-p545', 
showing last 15 lines of /Users/bmalets/.rvm/log/1394647562_ruby-1.9.3-p545/update_system.log 
checking Mac OS X version... 10.9.2 
checking Xcode location... /Applications/Xcode.app/Contents/Developer 
checking Xcode version... 5.0.2 
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. 
 

請幫忙。

P.S. 我試圖更新我的命令行工具,它也失敗了:

enter image description here

我嘗試更新端口:sudo port -v selfupdate,並問我的命令行工具:)


bmalets$ sudo xcode-select --install 
xcode-select: note: install requested for command line developer tools 
+0

我在同一條船上還算是拿了,但事實上,www.macports.org不再解析很心疼。他們沒有繳納註冊服務商的費用嗎? (我應該說我只是做了Xcode選擇 - 安裝,它按預期工作) – tobinjim

回答

3

基於這樣的事實,編譯器不工作,我檢查是否存在/usr/bin/llvm-gcc-4.2。它沒有,但是有一個別名/ usr/bin/llvm-gcc。 所以我複製的別名在/ usr/bin中/ LLVM-GCC到:/usr/bin/llvm-gcc-4.2 (此別名指向:在/ usr/bin中/鐺)

後管理跑跑RVM要求安裝MacPorts。

3

我和OP有完全相同的問題。更新的命令行工具,並重新啓動終端後,我跟着Bjinse的評論通過複製該文件,並運行

$ RVM要求
(不知道複製文件是必要的)

然後

安裝MAC端口

$ rvm install 1.9.3

終於工作了。下

$ RVM名單已經安裝了紅寶石

然後我可以再

$ RVM升級1.9.3p545紅寶石2.1.1

0

如果你得到這樣的錯誤,其中終端說「RVM是不是一個函數」:

$ rvm use 1.9.3 

這樣做:

你需要運行後續

user$ source ~/.rvm/scripts/rvm 

然後運行這個

user$ type rvm | head -n 1 

,如果你得到

rvm is a function 

的問題就解決了。

here