标签:yum com 文件 command syntax syn pytho val ali
因为python2到python3的升级,导致使用yum相关的命令时报错:
报错一: command not found...
方案:修改/usr/bin/yum文件的第一行,将结尾的python改成python27(或python2.7),请自行尝试,修改后能查询yum版本即可;
报错二:cannot retrieve matalink for repository:epel/x86...
方案:sed -i ‘s#https://#http://#g‘ /etc/yum.repos.d/epel*repo #将https改成http
报错三:使用yum install ***命令报错;
1 Downloading packages: 2 File "/usr/libexec/urlgrabber-ext-down", line 28 3 except OSError, e: 4 ^ 5 SyntaxError: invalid syntax
方案:修改/usr/libexec/urlgrabber-ext-down,将/usr/bin/python最后的python改成python2.7(或27),请自行尝试,修改成功执行yum install命令即可;
191016 Linux中python2升级到python3导致yum命令报错
标签:yum com 文件 command syntax syn pytho val ali
原文地址:https://www.cnblogs.com/jakye/p/11686940.html