0

只需在新笔记本电脑上设置 rails 和 RVM,运行时出现此错误

Error running 'requirements_osx_port_update_system ruby-2.0.0-p247',
please read /Users/#####/.rvm/log/1380821805_ruby-2.0.0-p247/update_system.log
Requirements installation failed with status: 1.

当运行这个

sudo rvm install ruby

这会产生此代码。

[2013-10-03 13:36:45] requirements_osx_port_update_system
requirements_osx_port_update_system () 
{ 
    __rvm_try_sudo port -dv selfupdate || return $?
}
current path: /Users/matthewpetitt
command(2): requirements_osx_port_update_system ruby-2.0.0-p247
DEBUG: Copying /Users/matthewpetitt/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: /Users/matthewpetitt/.rvm/bin/port: port selfupdate failed: Error synchronizing     MacPorts sources: command execution failed

我已经安装了 Xcode 和 Xcode 命令行工具。以前有人修过这样的东西。

4

2 回答 2

1

意识到这只是一些工作中的网络配置,一定是阻塞了端口。检查您的网络权限或尝试其他网络。

于 2013-10-04T04:49:00.003 回答
0

您需要确保可以先运行此命令:

sudo port -dv selfupdate

这可能是暂时的网络问题 - 如果没有按照显示的说明进行操作。

于 2013-10-04T03:47:28.303 回答