0

如果我尝试通过 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
4

2 回答 2

1

根据日志,您正在超时命中rsync.macports.org. 我强烈建议卸载 MacPorts 并切换到homebrew。我认为你会发现使用自制软件而不是 MacPorts 的痛苦要少得多。

于 2013-11-09T20:06:09.320 回答
1

确保您已连接到 Internet 并运行$ 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。在 Mavericks 中安装需要相当长的时间。然后再次安装rvm。

于 2013-11-09T23:30:58.940 回答