python - 尝试卸载 Macports 时出错

标签 python error-handling uninstallation macports homebrew

我正在使用 this链接以卸载 macports 并安装 Homebrew 软件。但是,我在第一步遇到了错误。我运行 sudo port -f uninstall installed 我的终端(顺便说一句,我在 mac 上),它立即向我吐出这个:

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 是一个很好的例子)或者不提供以后需要的错误修复。 Homebrew 信任 Apple,因此会使用 Apple 的版本

关于python - 尝试卸载 Macports 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9712265/

相关文章:

python - 你如何卸载 python 包/库

package - 从 Composer 中卸载一个软件包而不更新其他所有内容

python - 在 Pyramid 中创建动态类 View

python - 为什么 Decimal(0) 的科学格式与 float 0 不同?

python - 如何在流水线后对回归预测进行逆变换?

php - 如何在PHP Plates模板引擎上显示错误

r - 如何重新抛出R中的错误?

python - 如何将长 WhatsApp 消息作为单条消息而不是多条消息发送

apache - 我该如何开发一个程序来让Apache将错误日志发送到Web API?

scripting - 在 InnoSetup 中卸载结束时运行应用程序,处理用户取消