An error was reported when using Yum today:
[root@localhost /]# yum File "/usr/bin/yum", line 30 except KeyboardInterrupt, e: ^ SyntaxError: invalid syntax
It turned out that I installed Python 3.5 a few days ago
According to the prompt, the solution:
[root@localhost /]# vim /usr/bin/yum #!/usr/bin/python import sys try: import yum except ImportError: print >> sys.stderr, """\
Change the above statement to the default version of python2.6 before the system:
#!/usr/bin/python2.6 import sys try: import yum except ImportError: print >> sys.stderr, """\
yum can be used
: