其他分享
首页 > 其他分享> > 尝试卸载Macports时出错

尝试卸载Macports时出错

作者:互联网

我正在使用this链接来卸载macports,而是安装自制软件.但是,我在第一步中遇到了错误.我运行sudo port -f uninstall安装了我的终端(我在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 …

解决方法:

如果您要删除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是一个很好的例子)还是不提供以后需要的错误修复.自制软件信任苹果,因此将使用苹果的版本

标签:error-handling,homebrew,macports,uninstall,python
来源: https://codeday.me/bug/20191201/2082078.html