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

Web page HTML ordered list ol and unordered list ul

Lists for organizing data After learning so many ...

MYSQL local installation and problem solving

Preface This article is quite detailed and even a...

Example analysis of mysql non-primary key self-increment usage

This article uses an example to illustrate the us...

Use image to submit the form instead of using button to submit the form

Copy code The code is as follows: <form method...

Detailed explanation of vite2.0 configuration learning (typescript version)

introduce You Yuxi’s original words. vite is simi...

Some points on using standard HTML codes in web page creation

<br />The most common mistake made by many w...

MySQL 8.0.16 installation and configuration tutorial under CentOS7

Uninstall the old version of MySQL (skip this ste...

Highly recommended! Setup syntax sugar in Vue 3.2

Table of contents Previous 1. What is setup synta...

CentOS method to modify the default ssh port number example

The default ssh port number of Linux servers is g...

How to install and persist the postgresql database in docker

Skip the Docker installation steps 1. Pull the po...

Example of Vue uploading files using formData format type

In Vue, we generally have front-end and back-end ...

vue-element-admin global loading waiting

Recent requirements: Global loading, all interfac...

How to use & and nohup in the background of Linux

When we work in a terminal or console, we may not...

mysql obtains statistical data within a specified time period

mysql obtains statistical data within a specified...

MySQL database operations (create, select, delete)

MySQL Create Database After logging into the MySQ...