[Solved] yum Execute Error: -bash: /usr/bin/yum: /usr/bin/python3.7: bad interpreter: No such file or directory

Today, we upgraded our company’s products. As a result, yum was used during the installation. As a result, the yum command reported an error: “ - bash:/usr/bin/Yum:/usr/bin/Python 3.7: bad interpreter: no such file or directory"

Check the python Version (which Python). Python 3.0 is installed on the system 6. See the meaning of the error prompt. Yum needs to use pthon3 7 as an interpreter.

So you need to upgrade python, but Yum is not available. What should I do?One way is to manually download the RPM package of Python 3.7. Another way is:

(1) Modify the yum file (VIM/usr/bin/yum, insert, and then WQ save), and change the python version that Yum depends on to the version on the computer, as follows (/usr/bin/Python 3.7 is replaced by/usr/bin/Python):

(2) Create a python soft connection (use your own version of Python):

 ln -s /usr/bin/python /usr/bin/python3

(3) Update using yum. The results are as follows:

(4) finally, upgrade Python to 3.7

Similar Posts: