遇到這個錯誤是因為我升級了Python到3,但是yum-config-manager這個文件頭的Python沒有改成Python2队萤,如下:
[root@python ~]# python -V
Python 3.6.4
[root@IThink rpm]# vim /usr/bin/yum-config-manager
改為 python2 -tt
[root@python ~]# python -V
Python 3.6.4
[root@IThink rpm]# vim /usr/bin/yum-config-manager
改為 python2 -tt