yum报错[Errno 14] HTTP Error 404 - Not Found
程序员文章站
2022-01-03 10:04:21
...
yum 安装软件的时候,明明我的yum源有好几个,但是安装软件的时候,却报错了,我本来认为这么多yum源只要有一个源起作用,其他的就算是出现问题都没事,但是当我实际操作的时候却出错了。
[[email protected] yum.repos.d]# yum install createrepo -y
Loaded plugins: fastestmirror
file:///mnt/cdrom/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /mnt/cdrom/repodata/repomd.xml"
Trying other mirror.
http://mirrors.sohu.com/centos//os/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below knowledge base article
https://access.redhat.com/articles/1320623
If above article doesn't help to resolve this issue please create a bug on https://bugs.centos.org/
One of the configured repositories failed (added from: http://mirrors.sohu.com/centos//os/),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=mirrors.sohu.com_centos_os_ ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable mirrors.sohu.com_centos_os_
or
subscription-manager repos --disable=mirrors.sohu.com_centos_os_
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=mirrors.sohu.com_centos_os_.skip_if_unavailable=true
failure: repodata/repomd.xml from mirrors.sohu.com_centos_os_: [Errno 256] No more mirrors to try.
http://mirrors.sohu.com/centos//os/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
根据上述报错找到原因,发现主要的报错为:
[Errno 14] HTTP Error 404 - Not Found,
One of the configured repositories failed #其中一个repo 地址配置错误。
上述报错中出现次数最多的是http://mirrors.sohu.com/centos//os/
所以可以断定是我们的搜狐的repo地址配置出错。
我们将搜狐repo文件删除,发现可以成功安装软件。
总结:我们的yum 源一定要保证都可以使用,否则一旦其中一个源出错其他整个yum 都会报错。
附整个错误提示的翻译:
[[email protected] yum.repos.d]# yum install createrepo -y
Loaded plugins: fastestmirror
file:///mnt/cdrom/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /mnt/cdrom/repodata/repomd.xml"
先尝试本地的数据库
Trying other mirror.
http://mirrors.sohu.com/centos//os/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
搜狐的repo
Trying other mirror.
To address this issue please refer to the below knowledge base article (要解决此问题,请参阅以下知识库文章)
https://access.redhat.com/articles/1320623
If above article doesn't help to resolve this issue please create a bug on https://bugs.centos.org/
One of the configured repositories failed (added from: http://mirrors.sohu.com/centos//os/),
and yum doesn't have enough cached data to continue.
其中一个配置的存储库失败(添加自:http://mirrors.sohu.com/centos//os/),
而且yum没有足够的缓存数据来继续。
At this point the only safe thing yum can do is fail. 在这一点上,为了安全,yum唯一能做的就是失败。
There are a few ways to work "fix" this: #有几种方法可以解决这个问题
1. Contact the upstream for the repository and get them to fix the problem.
#联系上游的存储库,让他们解决问题。
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream.
#重新配置存储库的baseurl/等,以指向一个工作上游。
This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
如果您正在使用更新的存储库(和上一发行版的包仍然有效)
3. Run the command with the repository temporarily disabled
yum --disablerepo=mirrors.sohu.com_centos_os_ ...
在暂时禁用存储库的情况下运行该命令yum—禁用repo=镜像搜狐...
4. Disable the repository permanently, so yum won't use it by default.
永久禁用存储库,这样yum在默认情况下不会使用它。
Yum will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
#然后,Yum将忽略存储库,直到永久启用它或者使用--enablerepo临时使用
yum-config-manager --disable mirrors.sohu.com_centos_os_
or
subscription-manager repos --disable=mirrors.sohu.com_centos_os_
5. Configure the failing repository to be skipped, if it is unavailable.#如果失败的存储库不可用,请将其配置为跳过
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower).
请注意,yum将尝试联系repo。当它运行大多数命令时,所以每次都会尝试失败。yum将是很多慢一点)。
If it is a very temporary problem though, this is often a nice
compromise:
#如果这是一个非常暂时的问题,这通常是一个好的妥协:
yum-config-manager --save --setopt=mirrors.sohu.com_centos_os_.skip_if_unavailable=true
failure: repodata/repomd.xml from mirrors.sohu.com_centos_os_: [Errno 256] No more mirrors to try.
http://mirrors.sohu.com/centos//os/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
推荐阅读
-
Docker 安装错误 repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found Trying other mirror.
-
centos 7 yum安装失败(HTTP Error 404 - Not Found)的解决方法
-
yum makecache时报错[Errno 14] PYCURL ERROR 22 - “The requested URL returned error: 404 Not Found“
-
yum源 报错:[Errno 14] HTTP Error 404 - Not Found
-
Centos 7 阿里yum源 [Errno 14] HTTP Error 404 – Not Found 问题解决方案
-
yum makecache时报错[Errno 14] PYCURL ERROR 22 - “The requested URL returned error: 404 Not Found“
-
centos7 yum 出现 [Errno 14] HTTP Error 404 - Not Found 的解决方法
-
centos 7 yum安装失败(出现repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found)的解决方法
-
centos7 yum 更新出现 [Errno 14] HTTP Error 404 - Not Found 的解决方法
-
yum安装软件包错误 HTTP Error 404: Not Found Trying ot...