2013-11-09 22 views
0

如果我試圖通過RVM安裝ruby 2.0.0,但是我得到了以下輸出並且不知道我在做什麼錯誤,如果有人可以幫我解決這個問題, :無法在我的系統上安裝Ruby 2.0.0

Warning! PATH is not properly set up, '/Users/sebastianboldt/.rvm/gems/ruby-1.9.3-p327/bin' is not at first place, 
     usually this is caused by shell initialization files - check them for 'PATH=...' entries, 
     it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles', 
     to fix temporarily in this shell session run: 'rvm use ruby-1.9.3-p327'. 
Searching for binary rubies, this might take some time. 
No binary rubies available for: osx/10.7/i386/ruby-2.0.0-p247. 
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies. 
Checking requirements for osx. 
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'. 
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'. 
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'. 
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'. 
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'. 
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'. 
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'. 
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'. 
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'. 
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'. 
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'. 
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'. 
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'. 
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'. 
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'. 
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'. 
Installing requirements for osx. 
Updating system.............. 
Error running 'requirements_osx_port_update_system ruby-2.0.0-p247', 
please read /Users/sebastianboldt/.rvm/log/1384027204_ruby-2.0.0-p247/update_system.log 
Requirements installation failed with status: 1. 

這是我的日誌文件看起來像:

[2013-11-09 21:00:04] requirements_osx_port_update_system 
requirements_osx_port_update_system() 
{ 
    __rvm_try_sudo port -dv selfupdate || return $? 
} 
current path: /Users/sebastianboldt/Software Development/Ruby on Rails/first_app 
command(2): requirements_osx_port_update_system ruby-2.0.0-p247 
DEBUG: Copying /Users/sebastianboldt/Library/Preferences/com.apple.dt.Xcode.plist to /opt/local/var/macports/home/Library/Preferences 
DEBUG: MacPorts sources location: /opt/local/var/macports/sources/rsync.macports.org/release/tarballs 
---> Updating MacPorts base sources using rsync 
rsync: failed to connect to rsync.macports.org: Operation timed out (60) 
rsync error: error in socket IO (code 10) at /SourceCache/rsync/rsync-42/rsync/clientserver.c(105) [receiver=2.6.9] 
Command failed: /usr/bin/rsync -rtzv --delete-after rsync://rsync.macports.org/release/tarballs/base.tar /opt/local/var/macports/sources/rsync.macports.org/release/tarballs 
Exit code: 10 
DEBUG: Error synchronizing MacPorts sources: command execution failed 
    while executing 
"macports::selfupdate [array get global_options] base_updated" 
Error: Error synchronizing MacPorts sources: command execution failed 
To report a bug, follow the instructions in the guide: 
    http://guide.macports.org/#project.tickets 
Error: /opt/local/bin/port: port selfupdate failed: Error synchronizing MacPorts sources: command execution failed 

回答

1

根據日誌,你超時打rsync.macports.org。我強烈建議您卸載MacPorts並切換到homebrew。我想你會發現使用自制軟件而不是MacPorts的痛苦更少。

+0

卸載Macports爲我做;)。謝謝。 –

1

確保您已連接到互聯網並運行$ sudo port selfupdate -d。如果更新不能正常進行的錯誤入手RVM安裝,否則卸載MacPorts的:

$ sudo port -fp uninstall installed 
$ sudo rm -rf \ 
    /opt/local \ 
    /Applications/DarwinPorts \ 
    /Applications/MacPorts \ 
    /Library/LaunchDaemons/org.macports.* \ 
    /Library/Receipts/DarwinPorts*.pkg \ 
    /Library/Receipts/MacPorts*.pkg \ 
    /Library/StartupItems/DarwinPortsStartup \ 
    /Library/Tcl/darwinports1.0 \ 
    /Library/Tcl/macports1.0 \ 
    ~/.macports 

然後卸載RVM

$ rvm implode 

然後重新安裝第一的MacPorts。在小牛安裝需要相當長的時間。然後再次安裝rvm。