在Centos 7上安装EPEL存储库会破坏yum功能吗?

Jan*_*ara 8 linux centos yum epel

因此,我尝试设置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.repoepel-testing.repoetc/yum.repos.d(我复印其包含帖子的末尾)

但是,现在,无论何时我尝试对yum做某事,无论是更新还是安装某些软件包,它都会给我以下错误(例如,我曾经使用过,yum -y install Python3.6或者我也尝试过安装tsclientpython-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
Run Code Online (Sandbox Code Playgroud)

我已经尝试了数百万种方法来解决这个问题,但似乎无济于事:(

我像5次一样重新安装了它,完成了sudo yum clean all,我也尝试了在回购文件中以其他方式取消注释baseurl和注释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
Run Code Online (Sandbox Code Playgroud)

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
Run Code Online (Sandbox Code Playgroud)

And*_*tor 9

我们通过更新 curl 解决了这个问题。我相信 yum 在幕后使用 libcurl,而且似乎旧版本的 curl 无法协商与 epel 存储库的 TLS 连接。

yum update curl --disablerepo=epel
Run Code Online (Sandbox Code Playgroud)


iam*_*ser 4

您正在使用armhfp您的拱门,并且您正在查看的 epel metalink 中没有它的存储库。

如果您下载下面的链接,您将获得一个名为metalink. 您将看到没有匹配的存储库repo=epel-7&arch=armhfp。这就是你的问题的根源。

https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=armhfp
Run Code Online (Sandbox Code Playgroud)

您需要使用其他为armhfparch 提供 CentOS-7 支持的镜像。

例如,http://mirror.centos.org/altarch/7/os/armhfp/

为了使用它,您需要删除epel-releaseRPM 并安装以下内容:

rpm -ivh http://mirror.centos.org/altarch/7/os/armhfp/Packages/centos-userland-release-7-4.1708.el7.centos.0.1.armv7hl.rpm
Run Code Online (Sandbox Code Playgroud)

yum install然后为你的包裹做一个。