【问题标题】:Error when trying to uninstall Macports尝试卸载 Macports 时出错
【发布时间】:2012-03-15 00:12:37
【问题描述】:

我使用this 链接来卸载macports,而是安装自制软件。但是,我在第一步遇到了错误。我运行 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...

【问题讨论】:

    标签: python error-handling uninstallation macports homebrew


    【解决方案1】:

    如果你要删除 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 供应商的开发人员发现供应商(例如 Apple)可以改变事情并导致问题(参见最新更新Xcode 是一个很好的例子)或不提供以后需要的错误修复。 Homebrew 信任 Apple,因此会使用 Apple 的版本

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-04-13
      • 2014-06-10
      • 1970-01-01
      • 1970-01-01
      • 2011-08-08
      • 2017-01-21
      • 1970-01-01
      • 2016-04-02
      相关资源
      最近更新 更多