卸载从源代码构建的python? [英] Uninstall python built from source?

查看:29
本文介绍了卸载从源代码构建的python?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从源代码安装了 python 2.6,后来不知何故错误地从包管理器安装了另一个 python 2.6.

我找不到卸载从源代码构建的 python 的方法,这可能/容易吗?

运行 ubuntu 10.04.

解决方案

您可以使用 checkinstall 来删除 Python.思路是:

  1. 安装 checkinstall
  2. 使用checkinstall 来制作你的 debPython安装
  3. 使用 dpkg -r 来删除 deb.

有关详细信息,请参阅这篇文章.

附注.请注意,Ubuntu 必须始终至少安装一个 Python,否则操作系统的主要部分将停止工作.上面,我假设删除从源代码构建的 Python 是安全的,而不删除由包管理器安装的 Python.

PPS.如果你不小心从你的 Ubuntu 机器上删除了所有的 Python 安装,一切都不会丢失.有关如何从这种情况中恢复的说明可以在此处找到.>

I've installed python 2.6 from source, and somehow later mistakenly installed another python 2.6 from a package manager too.

I can't find a way to uninstall a python that was built from source, is this possible/easy?

Running ubuntu 10.04.

解决方案

You can use checkinstall to remove Python. The idea is:

  1. Install checkinstall
  2. Use checkinstall to make a deb of your Python installation
  3. Use dpkg -r to remove the deb.

See this post for more details.

PS. Note that Ubuntu must always have at least one installation of Python installed, or else major pieces of your OS stop working. Above, I'm assuming it's safe to remove the Python built from source, without removing the Python that was installed by the package manager.

PPS. If you accidentally erase all Python installations from your Ubuntu machine, all is not lost. Instructions on how to recover from this situation can be found here.

这篇关于卸载从源代码构建的python?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆