[Centos] Error downloading packages error occurred in yum

Error downloading packages error occurs
in yum. Error expression:
yum can list and clean cache, but it cannot be installed. Error message:

Downloading packages:

Error downloading packages:
libevent-devel-2.0.21-4.el7.x86_64: [Errno 5] [Errno 2] No such file or directory
libevent-2.0.21-4.el7.x86_64: [Errno 5] [Errno 2] ] No such file or directory

The reason for the error:
install python3 to modify the soft link, which is not completely modified

[root@duke ~]# mv /usr/bin/python /usr/bin/python2.6.6
[root@duke ~]# ln -s /usr/local/bin/python3.6 /usr/bin/python
[root @duke ~]# vi /usr/bin/yum
put
#!/usr/bin/python at the head of the file

Change to
#!/usr/bin/python2.6.6

After the modification, I found that yum can list and clean cache, but it cannot be installed.

Error resolution:
modify the corresponding version of python in the downloader

[root@duke ~]# vi /usr/libexec/urlgrabber-ext-down #!/usr/bin/python
at the head of the file

Change to
#!/usr/bin/python2.6.6

Error summary:
only consider yum when making soft links, but did not expect to modify the downloader. After establishing a soft link to change the python version, the corresponding python version cannot be found.

Guess you like

Origin blog.csdn.net/weixin_45005811/article/details/113685904