简体   繁体   中英

Uninstall python 2.6 without yum

I accidentally downloaded python2.6.6 on my centos Virtual Machine from python.org's official download package and compiled it to source.

Now in my /usr/local/bin I have a python2.6 shell available and now if I use which python it will give me the path of /usr/local/bin instead of original python2.7's path which is /usr/bin.

Since I installed it from source, yum doesn't recognise python2.6.6 as a package and I want to get rid of it.

If I do rpm -q python it gives me a result of python-2.7.5-48.0.1.el7.x86_64

Is it possible to uninstall python2.6.6 and I will just re-point my python system variable to /usr/bin again?

Sure, but you'll have to do it the hard way. Dig through /usr/local looking for anything Python-related and remove it. The python in /usr/bin should be revealed once the one in /usr/local/bin is removed.

Also, next time make altinstall . It will install a versioned executable that won't get in the way of the native executable.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM