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:
- [Solved] pip and setuptools upgrade Error: Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-fH0Feg/pip/
- How to Solve pip3 ImportError: cannot import name ‘main’
- Pychar can’t install the third-party library, the solution of error code non zero exit code (1)
- [Solved] Centos6: Python 2.6 upgrade to 3.7, error handling [no module named ‘_ctypes’]
- [antd vue Update] Some Components Error: Error in data(): “TypeError” & Cannot read properties of undefined (reading ‘pageSize’)
- No Python interpreter configured for the project
- How to Solve Centos Yum Error: No module named yum
- Failed to create symbolic link ‘/usr/bin/utserver’: File exists with Error: Cannot find…
- Python.exe Error: No module named pip.__main__; ‘pip’ is a package and cannot be directly executed
- mysql 1449 The user specified as a definer does not exist