gpt4 book ai didi

python - brew 卸载 python 错误 : Refusing to uninstall

转载 作者:行者123 更新时间:2023-12-05 02:08:29 27 4
gpt4 key购买 nike

我决定使用 brew 安装 python3:brew install python

我如何撤消此操作?我尝试了 brew uninstall python 并得到了这个错误:

Error: Refusing to uninstall /usr/local/Cellar/python/3.7.7
because it is required by libxml2 and libxmlsec1, which are currently installed.
You can override this and force removal with:
brew uninstall --ignore-dependencies python

我尝试取消链接 brew unlink python - 有效,但我仍然无法卸载。 --ignore-dependencies 是执行此操作的正确方法吗?

最佳答案

要使用 brew 删除 python,您需要先卸载指定的依赖项,即执行:

brew uninstall libxmlsec1 && brew uninstall libxml2

在那之后,您应该能够像您最初尝试的那样使用 brew uninstall python 卸载 python

您可以使用错误消息中的建议,brew uninstall --ignore-dependencies python,但是依赖项将保持安装但不会运行,这可能会导致进一步的问题。

关于python - brew 卸载 python 错误 : Refusing to uninstall,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60849358/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com