Linux 百胜回购发行

Linux 百胜回购发行,linux,centos7,yum,Linux,Centos7,Yum,My 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 Serve

My 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安装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]没有更多镜像可供尝试。

我这里有两个问题:

  • 为什么它关注的是“更新”回购协议而不是基本回购协议`yum info yum utils`将repo字段设置为'updates'。当我在repo文件中禁用'updates'repo并执行'yum info yum utils'操作时,repo字段将正确显示为'base'。是什么决定了回购协议要考虑给定的一揽子计划?
  • 为什么在baseUrl尝试在更新repo中查找yum-utils时会将“Package”附加到它?这会导致“500内部服务器错误”,因为附加了包的路径无效

来自
Yum
内部服务器错误的急救很可能是远程服务器上的
repodata
损坏和/或客户端与服务器之间的
缓存不匹配

要清除缓存,请使用

$ yum --enablerepo=* clean all
或者,如果默认情况下启用了所有回购:

$ 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.

来自
Yum
内部服务器错误的急救很可能是远程服务器上的
repodata
损坏和/或客户端和服务器之间的
缓存不匹配

要清除缓存,请使用

$ yum --enablerepo=* clean all
或者,如果默认情况下启用了所有回购:

$ 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.

您的repo和/或
yum元数据中的
repodata
似乎未清除。请尝试
yum--enablerepo=*clean all
,然后重试。堆栈溢出是编程和开发问题的网站。这个问题似乎离题了,因为它与编程或开发无关。请参见帮助中心中的。如果我在一次试图安装它们的傀儡运行中遇到这个问题,这不是一个开发问题吗??但是我会把它带到上面提到的网站。@I因为你是对的。清理回购并重试。它起作用了。谢谢如果您愿意,将其添加为答案,我将接受您的repo中的
repodata
和/或
yum metadata
似乎未清除。请尝试
yum--enablerepo=*clean all
,然后重试。堆栈溢出是编程和开发问题的网站。这个问题似乎离题了,因为它与编程或开发无关。请参见帮助中心中的。如果我在一次试图安装它们的傀儡运行中遇到这个问题,这不是一个开发问题吗??但是我会把它带到上面提到的网站。@I因为你是对的。清理回购并重试。它起作用了。谢谢如果你愿意,加上它作为一个答案,我会接受这对我有效。谢谢这对我很有用。谢谢