无法下载’powertools’仓库的元数据:无法下载repomd.xml

huangapple go评论91阅读模式
英文:

Failed to download metadata for repo 'powertools': Cannot download repomd.xml

问题

我想在Centos 8上启用Powertools以安装KDE。
但是我遇到了这个错误:

在下载“powertools”存储库的元数据时出现错误:
  - http://vault.centos.org/centos/8/PowerTools/x86_64/os/repodata/repomd.xml的状态码:403(IP:172.19.93.163)
错误:无法下载存储库“powertools”的元数据:无法下载repomd.xml:尝试了所有镜像

我的/etc/yum.repos.d/看起来像这样:

以及我的Powertools存储库文件如下:

#
# ###mirrorlist系统使用客户端的连接IP地址和每个镜像的更新状态来选择地理位置靠近客户端的当前镜像。除非您手动选择其他镜像,否则应使用此选项进行CentOS更新。
#
# 如果###mirrorlist对您不起作用,可以尝试注释掉的baseurl行。
[powertools]
name=CentOS Linux $releasever - PowerTools
###mirrorlist=http://###mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=PowerTools&infra=$infra
baseurl=http://vault.centos.org/$contentdir/$releasever/PowerTools/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
~
~
~
~ ```

我将基本URL更改为指向vault的URL。我理解这与Centos 8在2021年结束生命周期有关。我运行了以下命令:

sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*

sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*


和

```sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.epel.cloud|g' /etc/yum.repos.d/CentOS-Linux-*

我只需要一个有效的URL来安装Powertools。我是否漏掉了什么?

英文:

I want to enable Powertools on Centos 8 for installing KDE.
But i get this error:

``` 
Errors during downloading metadata for repository 'powertools':
  - Status code: 403 for http://vault.centos.org/centos/8/PowerTools/x86_64/os/repodata/repomd.xml (IP: 172.19.93.163)
Error: Failed to download metadata for repo 'powertools': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried ```

My /etc/yum.repos.d/ looks like this :
无法下载’powertools’仓库的元数据:无法下载repomd.xml

and my Powertools repo file looks lke this :

```  CentOS-Linux-PowerTools.repo
#
# The ###mirrorlist system uses the connecting IP address of the client and the
# update status of each mirror to pick current mirrors that are geographically
# close to the client.  You should use this for CentOS updates unless you are
# manually picking other mirrors.
#
# If the ###mirrorlist does not work for you, you can try the commented out
# baseurl line instead.
[powertools]
name=CentOS Linux $releasever - PowerTools
###mirrorlist=http://###mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=PowerTools&infra=$infra
baseurl=http://vault.centos.org/$contentdir/$releasever/PowerTools/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
~
~
~
~ ```

i changed the base URL to the one pointing to vault. I understood that it has something to do with Centos 8 reaching end of life in 2021. I ran these commands:

# sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
# sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

and

sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.epel.cloud|g' /etc/yum.repos.d/CentOS-Linux-*

I would just need a valid url where to install the powertools . Is there something i am missing?

答案1

得分: 0

我找到了一个有效的解决方案:

  1. 我安装了一个带有相同 Linux 镜像的虚拟机。
  2. 我从虚拟机镜像中复制了存储库文件,并替换了我的当前虚拟机上的文件。我这样做是因为我想要重置存储库文件。
    3.(最重要的一步)我迁移到了 Rocky Linux。这是 CentOS 8 的一个分支。它的工作方式与应该的一样。它基本上就像一个带有可用存储库的 CentOS。

Rocky Linux 有很好的文档,而且它只是能够正常工作。

英文:

i found a working solution:

  1. I installed a Virtual Box with the same Linux image
  2. I copied the repo files from the virtualbox image and replaced the ones on my current VM. I did this because i wanted a reset for the repo files.
    3.(most important step) I migrated to Rocky Linux . This is a fork of Centos 8. Works exactly how it should. It's basically like a Centos with working repo's.

Rocky Linux has good documentations and it just works.

huangapple
  • 本文由 发表于 2023年7月14日 00:28:53
  • 转载请务必保留本文链接:https://go.coder-hub.com/76681550.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定