解决方法centos8 Errors during downloading metadata for repository ‘rabbitmq-erlang‘

Posted PacosonSWJTU

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决方法centos8 Errors during downloading metadata for repository ‘rabbitmq-erlang‘相关的知识,希望对你有一定的参考价值。

【README】问题概述 

Errors during downloading metadata for repository 'rabbitmq-erlang':
  - Status code: 404 for https://dl.bintray.com/rabbitmq-erlang/rpm/erlang/23/el/8/repodata/repomd.xml (IP: 3.227.81.238)
Error: Failed to download metadata for repo 'rabbitmq-erlang': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

【1】解决方法 

在/etc/yum.repos.d/目录下编辑 rabbitmq-erlang.repo 

vim rabbitmq-erlang.repo

#In /etc/yum.repos.d/rabbitmq-erlang.repo
[rabbitmq-erlang]
name=rabbitmq-erlang
baseurl=https://dl.bintray.com/rabbitmq-erlang/rpm/erlang/23/el/8
gpgcheck=1
gpgkey=https://dl.bintray.com/rabbitmq/Keys/rabbitmq-release-signing-key.asc
repo_gpgcheck=0
enabled=1
#yum clean all
#yum makecache

显然 baseurl无法访问,所以需要重新编辑; 

通过在github上查看 rabbimq erlang安装指南 https://github.com/rabbitmq/erlang-rpm , 

我们把 rabbitmq-erlang.repo 修改如下:

# In /etc/yum.repos.d/rabbitmq_erlang.repo
[rabbitmq-rabbitmq-erlang]
name=rabbitmq-rabbitmq-erlang
baseurl=https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/rpm/el/8/$basearch
repo_gpgcheck=1
enabled=1
gpgkey=https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key
gpgcheck=1
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
pkg_gpgcheck=1
autorefresh=1
type=rpm-md

[rabbitmq-rabbitmq-erlang-noarch]
name=rabbitmq-rabbitmq-erlang-noarch
baseurl=https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/rpm/el/8/noarch
repo_gpgcheck=1
enabled=1
gpgkey=https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key
       https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc
gpgcheck=1
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
pkg_gpgcheck=1
autorefresh=1
type=rpm-md

[rabbitmq-rabbitmq-erlang-source]
name=rabbitmq-rabbitmq-erlang-source
baseurl=https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/rpm/el/8/SRPMS
repo_gpgcheck=1
enabled=1
gpgkey=https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key
       https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc
gpgcheck=1
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
pkg_gpgcheck=1
autorefresh=1
type=rpm-md

再次执行 yum  update -y

[root@centos202 yum.repos.d]# yum update -y            
rabbitmq-rabbitmq-erlang                                                                                                                                                    348  B/s | 659  B     00:01    
rabbitmq-rabbitmq-erlang-noarch                                                                                                                                             105  B/s | 291  B     00:02    
rabbitmq-rabbitmq-erlang-source                                                                                                                                             327  B/s | 659  B     00:02    
rabbitmq-rabbitmq-erlang-source                                                                                                                                             1.5 kB/s | 1.3 kB     00:00    
Importing GPG key 0xCC4BBE5B:
 Userid     : "Cloudsmith Package (rabbitmq/rabbitmq-erlang) <support@cloudsmith.io>"
 Fingerprint: A16A 4251 6F6A 691B C1FF 5621 E495 BB49 CC4B BE5B
 From       : https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key
rabbitmq-rabbitmq-erlang-source                                                                                                                                             0.0  B/s |   0  B     01:24    
Errors during downloading metadata for repository 'rabbitmq-rabbitmq-erlang-source':
  - Curl error (7): Couldn't connect to server for https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc [Failed to connect to github.com port 443: Connection refused]
Error: Failed to retrieve GPG key for repo 'rabbitmq-rabbitmq-erlang-source': Curl error (7): Couldn't connect to server for https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc [Failed to connect to github.com port 443: Connection refused]

还是报错。 原因是,无法下载文件签名(但通过代理是可以访问的); 

Couldn't connect to server for https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc

解决方法:

把上述签名key文件下载到本地,然后手动导入到rpm;

refer2 https://techglimpse.com/configure-gpg-key-yum-repo-tutorial/ 

以上是关于解决方法centos8 Errors during downloading metadata for repository ‘rabbitmq-erlang‘的主要内容,如果未能解决你的问题,请参考以下文章

centos8报错:Errors during downloading metadata for repository ‘base‘

linuxcentos8报错:Errors during downloading metadata for repository ‘base‘

eclipse Errors during build

ssh传输出现encountered 1 errors during the transfer解决办法

SSH上传提示:encountered 1 errors during the transfer错误解决办法

已解决Errors during downloading metadata for repository ‘appstream‘: - Status code: 404 for