Broke my centos7 VPS when trying to update Python

Issues related to applications and software problems
User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Broke my centos7 VPS when trying to update Python

Post by jlehtone » 2018/08/07 13:35:03

Yes, a reboot stops processes like "scl" and "bash", and you (hopefully) did not modify the environment of your login shell (apart these symlinks).

Code: Select all

cd /usr/bin
sudo rm /usr/bin/python /usr/bin/python2
sudo ln -s python2.7 python2
sudo ln -s python2 python
Note: it is misleading that "python3.5" invokes python2.7. What has created such links?



PS: Posting text takes much less space and time than embedding bitmap images.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Broke my centos7 VPS when trying to update Python

Post by TrevorH » 2018/08/07 13:51:59

Really not keen on python2.7.5 pointing to a copy in /usr/local...
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

water
Posts: 7
Joined: 2018/08/07 09:58:53

Re: Broke my centos7 VPS when trying to update Python

Post by water » 2018/08/07 14:35:44

jlehtone wrote:
2018/08/07 13:35:03
Yes, a reboot stops processes like "scl" and "bash", and you (hopefully) did not modify the environment of your login shell (apart these symlinks).

Code: Select all

cd /usr/bin
sudo rm /usr/bin/python /usr/bin/python2
sudo ln -s python2.7 python2
sudo ln -s python2 python
Note: it is misleading that "python3.5" invokes python2.7. What has created such links?



PS: Posting text takes much less space and time than embedding bitmap images.
I used a lot of commands which I found in guides. So don't know what has created such links.
Behind this url you can find an overview of commands I used http://txt.do/dzide trying to achieve an update of python and then I tried to undo my changes.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Broke my centos7 VPS when trying to update Python

Post by TrevorH » 2018/08/07 15:58:01

Yuck. To be honest, the chances of recovery from that lot are slim. I would start over and this time, don't just do stuff at random in the hope of getting things to work. If you need a newer python on CentOS 7 then use the IUS community repo, install their python packages which go in alongside the system one then edit your scripts to invoke /usr/bin/python3.6 or whatever it supplies.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

water
Posts: 7
Joined: 2018/08/07 09:58:53

Re: Broke my centos7 VPS when trying to update Python

Post by water » 2018/08/07 17:51:11

Ah crap :) time to set up a new vps.

Post Reply