yum工具无法启动

来源:互联网 发布:淘宝300解id锁是真的吗 编辑:程序博客网 时间:2024/05/17 05:06

1、升级python2.7版本,致使yum无法启动:             

报错信息:

There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
 
No module named yum
 
Please install a package which provides this module, or
verify that the module is installed correctly.

 排疑:

       yum当中依赖python包,但奇怪的是暂时无法兼容python2.7以上的版本。

解难:

      编辑/etc/yum.conf文件,修改#!/usr/bin/python  #!/usr/bin/python2.6(前提条件是之前2.6以上的版本还存在,否则需要再安装以上版本)

  

2、使用docker,安装epel后,yum再次报错。

报错信息:

     Loading support for CentOS kernel ABI
    Loading mirror speeds from cached hostfile
    Error: Cannot retrieve metalink for repository: epel. Please verifyits path and try again

解决方案一、     

编辑/etc/yum.repos.d/epel.repo,把基础的恢复,镜像的地址注释掉

 

#baseurl
mirrorlist

 

改成

 

baseurl
#mirrorlist

 

解决方法二:

删除/etc/yum.repos.d/elep.repo文件

执行:yum makecache

0 0
原创粉丝点击