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

Detailed explanation of the use of props in React's three major attributes

Table of contents Class Component Functional Comp...

Use of Linux passwd command

1. Command Introduction The passwd command is use...

Analysis of the Principles of MySQL Slow Query Related Parameters

MySQL slow query, whose full name is slow query l...

The impact of limit on query performance in MySQL

I. Introduction First, let me explain the version...

Modification of time zone problem of MySQL container in Docker

Preface When Ahhang was developing the Springboot...

How to make ApacheBench support multi-url

Since the standard ab only supports stress testin...

MySQL sql_mode analysis and setting explanation

When inserting a set of data into the MySQL datab...

MySQL login and exit command format

The command format for mysql login is: mysql -h [...

Detailed explanation of how to configure Nginx web server sample code

Overview Today we will mainly share how to config...

Detailed explanation of persistent storage of redis under docker

In this chapter, we will start to operate redis i...

Detailed explanation of docker version es, milvus, minio startup commands

1. es startup command: docker run -itd -e TAKE_FI...

Common rule priority issues of Nginx location

Table of contents 1. Location / Matching 2. Locat...