Summary of solving the yum error problem after upgrading Python to 3.6.6 on CentOS 7

Summary of solving the yum error problem after upgrading Python to 3.6.6 on CentOS 7

I recently upgraded a test server operating system to Cent0S 7.5, and also upgraded Python from 2.7.5 to Python 3.6.6. After the upgrade, I found that an exception occurred when yum installed related packages, reporting an error such as "File "/usr/libexec/urlgrabber-ext-down", line 28". The specific error information is 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 testing and verification, this problem can be solved by the following method:

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

vi /usr/libexec/urlgrabber-ext-down changes /usr/bin/python to /usr/bin/python2.7 .

Summarize

The above is a summary of how to solve the yum error problem after upgrading Python to 3.6.6 on CentOS 7. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • Fix the problem that yum cannot be used correctly after upgrading Python to version 3.6 on CentOS7
  • Solution to uninstalling Python and yum in CentOs system
  • The perfect solution to the failure of installing python-pip using yum under CentOS

<<:  The perfect solution for MYSQL5.7.24 installation without data directory and my-default.ini and service failure to start

>>:  How to query a record in Mysql in which page of paging

Recommend

Use js to call js functions in iframe pages

Recently, I have been working on thesis proposals ...

N ways to cleverly implement adaptive dividers with CSS

Dividing lines are a common type of design on web...

View the frequently used SQL statements in MySQL (detailed explanation)

#mysql -uroot -p Enter password mysql> show fu...

Docker builds jenkins+maven code building and deployment platform

Table of contents Docker Basic Concepts Docker in...

Using react-virtualized to implement a long list of images with dynamic height

Table of contents Problems encountered during dev...

jQuery implements nested tab function

This article example shares the specific code of ...

MySQL InnoDB tablespace encryption example detailed explanation

Preface Starting from MySQL 5.7.11, MySQL support...

Detailed explanation of ActiveMQ deployment method in Linux environment

This article describes the deployment method of A...

Docker uses nextcloud to build a private Baidu cloud disk

Suddenly, I needed to build a private service for...

Differences between MySQL CHAR and VARCHAR when storing and reading

Introduction Do you really know the difference be...

Introduction to the use of MySQL source command

Table of contents Thoughts triggered by an online...

10 SQL statement optimization techniques to improve MYSQL query efficiency

The execution efficiency of MySQL database has a ...

Detailed explanation of MySQL cumulative calculation implementation method

Table of contents Preface Demand Analysis Mysql u...