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

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

问题描述

我已经从源代码安装了python 2.6,后来又以某种方式从软件包管理器中错误地安装了另一个python 2.6.

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

正在运行ubuntu 10.04.

解决方案

您可以使用checkinstall删除Python.这个想法是:

  1. 安装checkinstall
  2. 使用 检查安装以使您的经验丰富 Python安装
  3. 使用dpkg -r进行 删除deb.

有关更多详细信息,请参见此帖子.

PS.请注意,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天全站免登陆