redhat yum [Errno 14] curl#37 - \"Couldn't open file /mnt/repodata/repomd.

♀尐吖头ヾ 提交于 2019-11-27 10:59:50

 

Failed to start iptables.service: Unit iptables.service failed to load: No such file or directory.

错误貌似因为没有安装 iptables-services. 使用 yum install iptables-services 报错 xxxxx   [Errno 256] No more mirrors to try.

查了下执行以下命令

1: yum clean all   完成

2: yum makecache  出现以下错误:

[Errno 14] curl#37 - "Couldn't open file /mnt/repodata/repomd.xml

因为这个错误, 查了将近两个小时各种方法无解, 最后仔细看错误信息发现. 请求的路径是  /mnt/repodata/repomd.xml. 而我的redhat系统盘挂载的路径是  /mnt/cdrom/repodata/

有可能是之前修改了fstab. 

报错时候的fstab文件信息.

使用命令 vim /etc/fstab 修改fstab文件  inster 键插入模式, 修改完成后 按ESC后, 输入 :wq 保存

修改后的fstab文件:

修改fstab文件后, 执行 umount -a  解除挂载 ,   执行 mount -a  重新挂载.

重新执行 yum makecache   成功了. 

 

因为这个问题 折腾了我两个小时, 无奈都想重装redhat了. 这么容易解决的路径问题, 居然搜来搜去搜了两个小时. 以后遇到报错一定要认真看错误信息.

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!