gpt4 book ai didi

linux - 百胜 repo 问题

转载 作者:太空宇宙 更新时间:2023-11-04 10:07:07 25 4
gpt4 key购买 nike

我的 CentOS-Base.repo 有以下镜像:

[base]
name=CentOS-$releasever - Base
baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1

#released updates
[updates]
name=CentOS Server updates
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
baseurl=http://custom-url/centOS-updates/
enabled=1

当我说 yum install yum-utils 时,它失败并显示错误

http://custom-url/centOS-updates/Packages/yum-utils-1.1.31-46.el7_5.noarch.rpm:[Errno 14] HTTP 错误 500 - 内部服务器错误
尝试其他镜像。
下载包时出错:
yum-utils-1.1.31-46.el7_5.noarch:[Errno 256] 没有更多的镜像可以尝试。

这里有两个问题:

  • 为什么它查看 `updates` 存储库而不是 base。 `yum info yum-utils` 将 repo 字段设置为 `updates`。当我在 repo 文件中禁用“更新” repo 并执行“yum info yum-utils”时,它正确地将 repo 字段显示为“基本”。什么决定了给定一个包要查看的 repo 协议(protocol)?
  • 当它试图在更新存储库中查找 yum-utils 时,为什么将“Package”附加到 baseUrl?这会导致“500 内部服务器错误”,因为附加了包的路径无效

最佳答案

Yuminternal server error 的急救很可能是远程服务器上损坏的 repodata 和/或不匹配的 在客户端和服务器之间缓存

要删除缓存,请使用

$ yum --enablerepo=* clean all

或者只是这样,如果默认情况下启用了所有 repo 协议(protocol):

$ yum clean all

这将执行 yum 中可用的所有清理工作。以下是他们的工作:

 CLEAN OPTIONS
The following are the ways which you can invoke yum in clean mode. Note that "all files" in the commands below means "all files in currently enabled reposito‐
ries". If you want to also clean any (temporarily) disabled repositories you need to use --enablerepo='*' option.

yum clean expire-cache
Eliminate the local data saying when the metadata and mirrorlists were downloaded for each repo. This means yum will revalidate the cache for each repo.
next time it is used. However if the cache is still valid, nothing significant was deleted.

yum clean packages
Eliminate any cached packages from the system. Note that packages are not automatically deleted after they are downloaded.

yum clean headers
Eliminate all of the header files, which old versions of yum used for dependency resolution.

yum clean metadata
Eliminate all of the files which yum uses to determine the remote availability of packages. Using this option will force yum to download all the metadata
the next time it is run.

yum clean dbcache
Eliminate the sqlite cache used for faster access to metadata. Using this option will force yum to download the sqlite metadata the next time it is run,
or recreate the sqlite metadata if using an older repo.

yum clean rpmdb
Eliminate any cached data from the local rpmdb.

yum clean plugins
Tell any enabled plugins to eliminate their cached data.

yum clean all
Does all of the above.

关于linux - 百胜 repo 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51711042/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com