所以我正在尝试设置一个ssh堡垒服务器,但是我在设置EPEL时遇到了安装Python3.6的问题。
我正在使用CentOS Linux release 7.4.1708 (Core)
所以我试图首先使用sudo yum -y install epel-release
安装EPEL(我当然做过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
和评论metalink
在repo文件和其他方式等等,但没有任何帮助:(
有人可以告诉我,是什么原因造成这个错误?
我在某处读到它可能会启用/禁用某些存储库,但我不明白如何应对它。
非常感谢 !!!
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
热身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
你正在使用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
。
当我尝试在我的Raspberry Pi 3(新运行的CentOS 7)上安装Python3时,我遇到了你的问题。在一些google-fu之后,我遇到了this site,它帮助我在armhfp上安装了EPEL。这就是它所说的:
如何在armhfp上启用EPEL 7?
从某种意义上说,答案很容易,因为armfhp没有正式的EPEL存储库。但是因为很多用户都要求这样做,所以我们决定使用centos armhfp构建器来重新构建EPEL 7中的Source包(并尝试在它们空闲时自动跟踪它们)。请注意,它只是一个没有任何QA /测试的自动重建,也导致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有关,这就是您需要删除或禁用回购的原因。
我在VM上遇到过这个问题。我刚刚更改了metalink https访问并将其设置为标准http,如下所示:metalink = http://mirrors.fedoraproject.org ....
我们通过更新curl来解决这个问题。我相信yum在引擎盖下使用libcurl,似乎旧版本的curl无法协商与epel repo的TLS连接。
yum update curl --disablerepo=epel