IT漫步

技术生活札记©Yaohui

yum is broken after upgrade python from 2.x to 3.x on CentOS 7

yum is broken after upgrade python from 2.x to 3.x on CentOS7: # yum File "/usr/bin/yum", line 30 except KeyboardInterrupt, e: ^ Resolution: modify /usr/bin/yum and /usr/libexec/urlgrabber-ext-down, change first line from “#!/usr/bin/python” to “#!/usr/bin/python2”: #!/usr/bin/python2 import sys try: import yum except ImportError: print >> sys.stderr, """\ ... #! /usr/bin/python2 # A very simple external downloader …

Proudly powered by WordPress