所以我正在尝试设置一个ssh堡垒服务器,但是我在设置EPEL时遇到了安装Python3.6的问题。
我正在使用CentOS Linux release 7.4.1708 (Core)
所以我首先尝试使用安装 EPEL
sudo yum -y install epel-release
(之前我做了sudo yum -y update
并且工作正常),但它告诉我 Package 'epel-release' not found
因此,我尝试了使用 RedHat Package Manager :
的不同方法 sudo rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
此安装包已成功完成,我可以在epel.repo
中看到epel-testing.repo
和etc/yum.repos.d
(我在帖子末尾复制了他们的包含)
但是,现在,每当我尝试使用yum执行某些操作时,无论是更新还是安装某些软件包,都会出现以下错误(例如我使用yum -y install Python3.6
或者我也尝试过安装 tsclient 或 python-pip ):
[root@scw-39016b yum.repos.d]# yum install -y Python3.6
Loaded plugins: fastestmirror
base | 3.6 kB 00:00
centos-kernel | 2.9 kB 00:00
epel/armhfp/metalink | 42 kB 00:00
Could not parse metalink https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=armhfp error was
No repomd file
One of the configured repositories failed (Unknown),
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=<repoid> ...
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 <repoid>
or
subscription-manager repos --disable=<repoid>
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=<repoid>.skip_if_unavailable=true
File /var/cache/yum/armhfp/7/epel/metalink.xml does not exist
我已经尝试过百万种方法,似乎没有任何帮助:(
我重新安装了5次,我已经完成了sudo yum clean all
,我尝试取消注释baseurl
并在repo文件中评论metalink
等等,但是没有...帮助:(
有人可以告诉我,是什么导致了此错误?
我在某处读过它可能会启用/禁用某些存储库,但我不明白如何应对它..
非常感谢!!!
epel.repo
[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch/debug
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
baseurl=http://download.fedoraproject.org/pub/epel/7/SRPMS
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
EPEL-testing.repo
[epel-testing]
name=Extra Packages for Enterprise Linux 7 - Testing - $basearch
baseurl=http://download.fedoraproject.org/pub/epel/testing/7/$basearch
metalink=https://mirrors.fedoraproject.org/metalink?repo=testing-epel7&arch=$basearch
failovermethod=priority
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
[epel-testing-debuginfo]
name=Extra Packages for Enterprise Linux 7 - Testing - $basearch - Debug
baseurl=http://download.fedoraproject.org/pub/epel/testing/7/$basearch/debug
metalink=https://mirrors.fedoraproject.org/metalink?repo=testing-debug-epel7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
[epel-testing-source]
name=Extra Packages for Enterprise Linux 7 - Testing - $basearch - Source
baseurl=http://download.fedoraproject.org/pub/epel/testing/7/SRPMS
metalink=https://mirrors.fedoraproject.org/metalink?repo=testing-source-epel7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
答案 0 :(得分:3)
你正在使用armhfp
作为你的拱门,而你正在看的epel metalink中没有它的回购。
如果您下载以下链接,您将获得一个名为metalink
的文件。您将看到没有匹配repo=epel-7&arch=armhfp
的仓库。这是你问题的根源。
https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=armhfp
您需要使用其他镜像,为armhfp
arch提供CentOS-7支持。
例如,http://mirror.centos.org/altarch/7/os/armhfp/
要使用它,您需要删除epel-release
RPM并安装以下内容:
rpm -ivh http://mirror.centos.org/altarch/7/os/armhfp/Packages/centos-userland-release-7-4.1708.el7.centos.0.1.armv7hl.rpm
然后为您的包裹做一个yum install
。
答案 1 :(得分:2)
当我尝试在我的Raspberry Pi 3(新运行的CentOS 7)上安装Python3时,我遇到了你的问题。在一些google-fu之后,我遇到了this site,这帮助我在armhfp上安装了EPEL。 这就是它所说的:
如何在armhfp上启用EPEL 7?
从某种意义上说,答案很简单,没有正式的EPEL armfhp的存储库。但是因为很多用户要求这个, 我们决定使用centos armhfp构建器来(重新)构建Source 来自EPEL 7的包(并尝试自动跟踪) 他们闲着请注意,它只是一个没有自动重建 任何质量保证/测试,以及产生的pkgs也没有签名。要使用它 存储库,像这样继续:
cat > /etc/yum.repos.d/epel.repo << EOF
[epel]
name=Epel rebuild for armhfp
baseurl=https://armv7.dev.centos.org/repodir/epel-pass-1/
enabled=1
gpgcheck=0
EOF
按照这些步骤后,我能够成功运行sudo yum install epel-release
,然后在我的覆盆子pi上安装python3。
在你这样做之前,你需要让yum工作。我不确定我是最好的帮助,但我建议删除(或至少禁用)当前版本的epel repos。
yum remove epel
yum remove epel-release
yum remove epel-testing
您似乎已启用第三方代码已损坏。这导致您的问题与yum有关,这就是您需要删除或禁用回购的原因。
答案 2 :(得分:2)
我在VM上遇到过这个问题。我刚刚更改了metalink https访问并将其设置为标准http,如下所示: metalink的= 的http:// mirrors.fedoraproject.org ...
答案 3 :(得分:1)
我们通过更新curl来解决此问题。我相信yum会在幕后使用libcurl,而且似乎较旧的curl版本无法协商到epel存储库的TLS连接。
yum update curl --disablerepo=epel
答案 4 :(得分:1)
我遇到了同样的问题,为了解决这个问题,我做了以下事情:
$ yum install epel-release
$ cd /etc/yum.repos.d
$ rm epel-testing.repo
$ yum clean all
$ yum update -
对我有用!
答案 5 :(得分:1)
问题是,即使我们通过rpm安装epel,在 epel.repo 和 epel-testing.repo 文件中配置的baseurl路径也是无效的,因为 https://download.fedoraproject.org/ 不存在。
有效路径为: https://dl.fedoraproject.org/pub/
因此,从以下位置修改 /etc/yum.repos.d/epel.repo 中的基本网址:baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
对此:
baseurl=http://dl.fedoraproject.org/pub/epel/7/$basearch
答案 6 :(得分:0)
我们有一个非常相似的问题,我已经看到了几次请求帮助,最常见的响应是“不要使用'https',但这会使您容易受到MITM攻击”。必须有一个更好的答案。
我们只是在服务器上全新安装了CentOS Linux版本7.7.1908(核心),并且每当尝试sudo yum install epel-release
时,就像OP一样,都会破坏yum。
这里是安装:
-bash-4.2$ sudo yum install epel-release
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.sonic.net
* extras: mirror.fileplanet.com
* updates: mirror.fileplanet.com
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-11 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===================================================================================================================================================================================================================================
Package Arch Version Repository Size
===================================================================================================================================================================================================================================
Installing:
epel-release noarch 7-11 extras 15 k
Transaction Summary
===================================================================================================================================================================================================================================
Install 1 Package
Total download size: 15 k
Installed size: 24 k
Is this ok [y/d/N]: y
Downloading packages:
epel-release-7-11.noarch.rpm | 15 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : epel-release-7-11.noarch 1/1
Verifying : epel-release-7-11.noarch 1/1
Installed:
epel-release.noarch 0:7-11
Complete!
现在,即使我们只是尝试运行yum list
,它也会失败:
-bash-4.2$ yum list
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
One of the configured repositories failed (Unknown),
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=<repoid> ...
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 <repoid>
or
subscription-manager repos --disable=<repoid>
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=<repoid>.skip_if_unavailable=true
Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again
这是/etc/yum.repos.d/epel.repo:
-bash-4.2$ cat epel.repo
[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch/debug
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/7/SRPMS
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
那么我们尝试访问的存储库是问题还是我们尝试使用“ https”协议访问的事实?如果是前者,我如何找到正确的存储库?如果是后者,我们如何去诊断潜在的问题?这是一个全新的安装-我们实际上所做的就是安装autos
并安装主目录,安装rvm
并创建一些用户和组。
FWIW,yum check-update
不报告任何内容,yum update curl
(带有或不带有“ --disablerepo = epel”)也没有执行任何操作。
我已经为此努力了一天,需要专业帮助。 ;-/
这个难题还有另外一块,这就是为什么我怀疑潜在的问题与“ https”有关。我们遇到这个问题,为什么尝试使用以下说明安装MongoDB:https://docs.mongodb.com/v4.0/tutorial/install-mongodb-on-red-hat/#using-rpm-packages-recommended
我们创建了/etc/yum.repos.d/mongodb-org-4.0.repo
,其内容为:
[mongodb-org-4.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc
然后尝试安装MongoDB并得到了一些不同的错误:
-bash-4.2$ sudo vi /etc/yum.repos.d/mongodb-org-4.0.repo
-bash-4.2$ sudo yum install -y mongodb-org
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.keystealth.org
* extras: mirror.fileplanet.com
* updates: mirrors.sonic.net
https://repo.mongodb.org/yum/redhat/7/mongodb-org/4.0/x86_64/repodata/repomd.xml: [Errno 14] curl#60 - "Peer's Certificate issuer is not recognized."
Trying other mirror.
It was impossible to connect to the CentOS servers.
This could mean a connectivity issue in your environment, such as the requirement to configure a proxy,
or a transparent proxy that tampers with TLS security, or an incorrect system clock.
You can try to solve this issue by using the instructions on https://wiki.centos.org/yum-errors
If above article doesn't help to resolve this issue please use https://bugs.centos.org/.
One of the configured repositories failed (MongoDB Repository),
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=mongodb-org-4.0 ...
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 mongodb-org-4.0
or
subscription-manager repos --disable=mongodb-org-4.0
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=mongodb-org-4.0.skip_if_unavailable=true
failure: repodata/repomd.xml from mongodb-org-4.0: [Errno 256] No more mirrors to try.
https://repo.mongodb.org/yum/redhat/7/mongodb-org/4.0/x86_64/repodata/repomd.xml: [Errno 14] curl#60 - "Peer's Certificate issuer is not recognized.”
但是,现在,如果我尝试执行此操作,则会收到“(未知)”错误。
这很令人困惑。
答案 7 :(得分:0)
这就是我所做的
sudo nano /etc/yum.repos.d/epel.repo
注释掉 metalink 并将现有的 baseurl 注释掉。
name=Extra Packages for Enterprise Linux 7 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
#metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
可以删除 {
[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch/debug
#metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/7/SRPMS
#metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
}
添加一个新的 baseurl
baseurl=https://armv7.dev.centos.org/repodir/epel-pass-1/
保存文件 须藤 yum 更新
我能够更新和下载 epel 存储库,并在检查是否使用 yum install epel-release 安装了 epel-release 时,我收到了一条已安装的软件包消息。更新:将 gpgcheck=1 更改为 0 应该没问题。我还删除了 gpgkey= 行。
如果有帮助,请告诉我!
[继续] 当我安装 htop.armv7h1 时,我必须使用 yum 执行 --nogpgcheck 并且它安装得很好。