gpt4 book ai didi

python - 从 Ubuntu 15.04 中删除 Mercurial-common

转载 作者:太空宇宙 更新时间:2023-11-03 17:23:01 24 4
gpt4 key购买 nike

我在 Ubuntu 15.04 上遇到 Python 2.x 问题。我想完全卸载并重新安装Python。我无法卸载 Python,因为 Mercurial-common 依赖于它。我尝试删除它,但收到错误:

➜  ~  sudo apt-get remove --purge mercurial-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
gnome-control-center-data gnome-icon-theme gnome-icon-theme-symbolic gnome-settings-daemon libcolord-gtk1 libexpat1-dev libgoa-backend-1.0-1 libjs-excanvas libpython3-dev
libpython3.4-dev python3-colorama python3-dev python3-distlib python3-wheel python3.4-dev
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
mercurial-common*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 8,610 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 206144 files and directories currently installed.)
Removing mercurial-common (3.1.2-2+deb8u1build0.15.04.2) ...
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site
dpkg: error processing package mercurial-common (--purge):
subprocess installed pre-removal script returned error exit status 1
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
mercurial-common
E: Sub-process /usr/bin/dpkg returned an error code (1)

最佳答案

mercurial-common 删除脚本使用 python

/var/lib/dpkg/info/mercurial-common.prerm

如果您输入 which pyclean 我认为它存在。不过我怀疑你的 python 问题阻止了它的工作。 (您可以尝试手动运行它来验证这一点)

不幸的是 pyclean 位于 python-minimal 包中,因此您可能无法在 Mercurial-common 之前卸载它。

您可以尝试通过以下方式手动删除它:

sudo mv /usr/bin/pyclean /usr/bin/pyclean.backup

(记得把它放回去)。

或者不完全删除 python,您可以尝试使用 dpkg --install 在现有安装的基础上重新安装 python 包 .deb

关于python - 从 Ubuntu 15.04 中删除 Mercurial-common,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32929792/

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