yum报错File "/usr/bin/yum", line 30 except KeyboardInterrupt, e:

Premise: Just now I wanted to install a git in yum, and then reported this ghost.

Reason: When learning python, I changed the python2.7 that comes with centos7 to python3.6.2. And yum uses python2, so yum will report an error.

Solution:
Change the top line of the files /usr/bin/yum and /usr/libexec/urlgrabber-ext-down to #!/usr/bin/python2.7

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326669198&siteId=291194637