我正在使用this链接卸载macports,而是安装自制软件。但是,我在第一步遇到错误。我运行sudo port -f uninstall installed
我的终端(我正在使用Mac btw),然后它向我吐了回来:
Warning: port definitions are more than two weeks old, consider using selfupdate
Warning: configured user/group macports does not exist, will build as root
---> Uninstalling python27 @2.7.1_3
Error: Target org.macports.uninstall returned: error deleting "/opt/local/var/macports/software/python27/2.7.1_3": directory not empty
Log for python27 is at: /opt/local/var/macports/logs/_opt_local_var_macports_registry_portfiles_python27_2.7.1_3/python27/main.log
Warning: Failed to execute portfile from registry for python27 @2.7.1_3
---> Uninstalling python27 @2.7.1_3
Error: port uninstall failed: error deleting "/opt/local/var/macports/software/python27/2.7.1_3": directory not empty
我不确定这些东西是什么意思,对macports不是很熟悉。我甚至不认为我用macports安装了python ......
答案 0 :(得分:3)
如果您要删除macports,我只会执行删除操作
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
您获得的第一个警告是由于没有最新版本的macports所以运行selfupdate。对于错误,您需要查看建议的日志/opt/local/var/macports/logs/_opt_local_var_macports_registry_portfiles_python27_2.7.1_3/python27/main.log
macports没有你问的安装python的原因可能是因为你要求一个需要使用python的端口。 Macports将安装自己的python,以便确切知道哪些版本和编译选项用于python,因为长期使用unix vendpors的开发人员发现供应商(例如Apple)可以改变事物并导致问题(请参阅最新更新到Xcode是一个很好的例子)或者不提供所需的后续错误修复。 Homebrew信任Apple,因此会使用Apple的版本