Mac:El Capitan升级后端口断开
时间:2020-02-23 14:45:03 来源:igfitidea点击:
通常,MacPort在Mac OSX升级后会出现问题。
在我的特定情况下,它是从优胜美地10.10升级到El Capitan 10.11之后的。
发出以下更新命令后:
sudo port selfupdate
出现以下错误:
Error: Error installing new MacPorts base: command execution failed Please run port -v selfupdate' for details. Error: /opt/local/bin/port: port selfupdate failed: Error installing new MacPorts base: command execution failed
所以我最终使用了建议的命令:
sudo port -v selfupdate
然后我评论了以下内容:
checking whether the C compiler works... no configure: error: in /opt/local/var/macports/sources/rsync.macports.org/release/tar包s/base': configure: error: C compiler cannot create executables
这告诉我Xcode出了点问题,所以我们只需要使用以下命令来解决此问题:
sudo xcode-select --install
然后,尝试升级过时的软件包:
sudo port upgrade outdated
现在一切应该恢复正常了。
注意:如果您最终无法执行升级命令,并且已按照所有这些步骤进行操作,则可以尝试通过在https://www.macports.org/ install.php下载安装程序来直接升级MacPort软件包。