如果我试图通过RVM安装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
答案 0 :(得分:1)
根据日志,你正在超时rsync.macports.org
。我强烈建议您卸载MacPorts并切换到homebrew。我认为使用自制软件而不是MacPorts,你会发现更少的痛苦。
答案 1 :(得分: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。