Summary of solving yum errors after CentOS 7 upgrades Python to 3.6. 6

  • 2021-07-01 08:28:51
  • OfStack

Recently, a test server operating system was upgraded to Cent0S 7.5, and then Python was upgraded from 2.7. 5 to Python 3.6. 6 by the way. After the upgrade was completed, an exception was found when installing related packages for yum, and errors such as "File"/usr/libexec/urlgrabber-ext-down "and line 28" were reported. The specific error messages are as follows:

# yum install openssl
..........................
Total download size: 1.7 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
File "/usr/libexec/urlgrabber-ext-down", line 28
except OSError, e:
^
SyntaxError: invalid syntax
File "/usr/libexec/urlgrabber-ext-down", line 28
except OSError, e:
^
SyntaxError: invalid syntax

After 1 test and verification, this problem can be solved by the following method:

Modify /usr/libexec/urlgrabber-ext-down Python version information in

vi /usr/libexec/urlgrabber-ext-down Will /usr/bin/python Replace with /usr/bin/python2.7 .

Summarize


Related articles: