Yum crashed with Keyboard Interrupt error Yum crashed with Keyboard Interrupt error python-3.x python-3.x

Yum crashed with Keyboard Interrupt error


Because yum does not support Python3.
You can run command vi /usr/bin/yum, change /usr/bin/python to /usr/bin/python2 in first line.
Thus you can run the command yum by Python2 instead of Python3.

Note however that this will make your setup unsupported and thus unmaintainable (as does what you did). You will likely have other similar problems in the future with other system packages.
If you want to use an alternative Python installation, consider installing it into /usr/local, /opt or using pyenv.


This issue happens when user upgrades to python3, Just simply edit the file --> /usr/bin/yum and change to first line to --> "#!/usr/bin/python2"

The above solution wouldn't solve the all yum dependency problems, its better to run the below commands.

sudo ln -s /usr/local/bin/python3 /usr/bin/python3 (Mark latest python as python3)

sudo ln -sf /usr/bin/python2.7 /usr/bin/python (nake 2.7 as default python)

THanks,Daman


I'm guessing you installed Python 3.2.3 from source and used "make install" as the last command. That command has the unfortunate side-effect of replacing the system installed version command "python" with the new version. Using "make altinstall" doesn't replace "python".

The command "python" is just a symbolic link to "python2", which in turn is a symbolic link to "python2.7". You should be able to restore "python" by executing the following command:

cd /usr/binsudo ln -s python2 python