CentOS-使用yum时出错

时间:2018-08-07 05:47:54

标签: centos yum

当我尝试使用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

请让我知道如何解决此问题,感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

/etc/yum.repos.d

中创建禁用的仓库
[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
相关问题