ICode9

精准搜索请尝试: 精确搜索
首页 > 系统相关> 文章详细

One of the configured repositories failed (Unknown), and yum doesn't have enough cached data t

2021-01-31 13:35:03  阅读:511  来源: 互联网

标签:epel httpd x86 cached Unknown configured 64 el7 2.4


 

1、问题

[root@localhost home]# yum install httpd
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.


 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. Disable the repository, 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>

     4. 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

 

2、解决方法,去掉baseurl前面的注释,将metalink注释掉

[root@localhost home]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# ls
epel.repo  epel-testing.repo  packagekit-media.repo  rhel7.repo
[root@localhost yum.repos.d]# vim 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&infra=$infra&content=$contentdir
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&infra=$infra&content=$contentdir
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&infra=$infra&content=$contentdir
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1

 

3、测试

[root@localhost yum.repos.d]# yum install httpd
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
epel                                                                                                          | 4.7 kB  00:00:00
rhel7                                                                                                         | 4.1 kB  00:00:00
(1/3): epel/x86_64/group_gz                                                                                   |  95 kB  00:00:04
(2/3): epel/x86_64/updateinfo                                                                                 | 1.0 MB  00:00:13
(3/3): epel/x86_64/primary_db                                                                                 | 6.9 MB  00:01:24
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-17.el7 will be installed
--> Processing Dependency: httpd-tools = 2.4.6-17.el7 for package: httpd-2.4.6-17.el7.x86_64
--> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.4.6-17.el7.x86_64
--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.4.6-17.el7.x86_64
--> Running transaction check
---> Package apr.x86_64 0:1.4.8-3.el7 will be installed
---> Package apr-util.x86_64 0:1.5.2-6.el7 will be installed
---> Package httpd-tools.x86_64 0:2.4.6-17.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================================
 Package                           Arch                         Version                            Repository                   Size
=====================================================================================================================================
Installing:
 httpd                             x86_64                       2.4.6-17.el7                       rhel7                       1.2 M
Installing for dependencies:
 apr                               x86_64                       1.4.8-3.el7                        rhel7                       103 k
 apr-util                          x86_64                       1.5.2-6.el7                        rhel7                        92 k
 httpd-tools                       x86_64                       2.4.6-17.el7                       rhel7                        77 k

Transaction Summary
=====================================================================================================================================
Install  1 Package (+3 Dependent packages)

Total download size: 1.4 M
Installed size: 4.3 M
Is this ok [y/d/N]: y
Downloading packages:
-------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                174 MB/s | 1.4 MB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : apr-1.4.8-3.el7.x86_64                                                                                            1/4
  Installing : apr-util-1.5.2-6.el7.x86_64                                                                                       2/4
  Installing : httpd-tools-2.4.6-17.el7.x86_64                                                                                   3/4
  Installing : httpd-2.4.6-17.el7.x86_64                                                                                         4/4
  Verifying  : httpd-tools-2.4.6-17.el7.x86_64                                                                                   1/4
  Verifying  : apr-1.4.8-3.el7.x86_64                                                                                            2/4
  Verifying  : apr-util-1.5.2-6.el7.x86_64                                                                                       3/4
  Verifying  : httpd-2.4.6-17.el7.x86_64                                                                                         4/4

Installed:
  httpd.x86_64 0:2.4.6-17.el7

Dependency Installed:
  apr.x86_64 0:1.4.8-3.el7               apr-util.x86_64 0:1.5.2-6.el7               httpd-tools.x86_64 0:2.4.6-17.el7

Complete!

 

标签:epel,httpd,x86,cached,Unknown,configured,64,el7,2.4
来源: https://www.cnblogs.com/liujiaxin2018/p/14352348.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有