【问题标题】:CentOS - error while using yumCentOS - 使用 yum 时出错
【发布时间】:2018-08-07 16:51:01
【问题描述】:

当我尝试使用 yum 时出现此错误,

http://iredmail.org/yum/rpms/6/repodata/repomd.xml: [Errno 14] problem making ssl connection
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: iRedMail. Please verify its path and try again

我尝试了以下方法,但错误仍然存​​在。

yum clean all
rm /var/lib/rpm/__db*
rpm --rebuilddb
yum update

请告诉我如何解决此问题,感谢您的帮助。

【问题讨论】:

    标签: centos yum


    【解决方案1】:

    /etc/yum.repos.d

    中创建repo.disabled
    [root@centos ~]# mkdir /etc/yum.repos.d/repo.disabled
    [root@centos ~]# ls /etc/yum.repos.d/
    centos.repo centos.repo  centos-updates.repo  centos-updates-testing.repo  
    repo.disabled
    

    然后将所有这些 3 回购文件移动到 repo.disabled 文件夹:

    [root@centos ~]# mv /etc/yum.repos.d/centos.repo/etc/yum.repos.d/repo.disabled
    [root@centos ~]# mv /etc/yum.repos.d/centos-updates.repo/etc/yum.repos.d/repo.disabled
    [root@centos ~]# mv /etc/yum.repos.d/centos-updates-testing.repo/etc/yum.repos.d/repo.disabled
    

    列出 /etc/yum.repos.d 中更新的文件和文件夹:

    [root@centos ~]# ls -l /etc/yum.repos.d/
    total 8
    -rw-r--r--. 1 root root   92 Aug 18 00:09 centos.repo
     drwxr-xr-x. 2 root root 4096 Aug 18 11:27 repo.disabled
    

    注意:只有文件 centos.repo 和文件夹 repo.disabled 应该存在。

    现在你必须运行 yum clean all 来清除缓存,一切都会正常工作。

    [root@centos ~]# yum clean all
    

    【讨论】:

      猜你喜欢
      • 2015-03-14
      • 1970-01-01
      • 2016-04-03
      • 2018-09-13
      • 1970-01-01
      • 2022-01-14
      • 2016-04-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多