目前各大镜像网站已经不支持6版本的epel源了 如果想使用 可以按照如下的办法进行配置 就可以使用epel源了 前提是机器可以通外网
[base]
name=CentOS-$releasever - Base
baseurl=https://archives.fedoraproject.org/pub/archive/epel/6/x86_64/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
来吧 展示
我的信息如下 配置好既可以使用网络yum了
[root@localhost yum.repos.d]
/etc/yum.repos.d
[root@localhost yum.repos.d]
bak ba.repo
[root@localhost yum.repos.d]
[base]
name=CentOS-$releasever - Base
baseurl=https://archives.fedoraproject.org/pub/archive/epel/6/x86_64/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
[root@localhost yum.repos.d]
CentOS release 6.9 (Final)
[root@localhost yum.repos.d]
PING www.a.shifen.com (14.215.177.38) 56(84) bytes of data.
64 bytes from 14.215.177.38: icmp_seq=1 ttl=55 time=17.8 ms
64 bytes from 14.215.177.38: icmp_seq=2 ttl=55 time=17.8 ms
^C
--- www.a.shifen.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1596ms
rtt min/avg/max/mdev = 17.806/17.814/17.822/0.008 ms
[root@localhost yum.repos.d]
PyYAML.x86_64 3.10-3.1.el6 @base
alsa-lib.x86_64 1.1.0-4.el6 @base
apr.x86_64 1.3.9-5.el6_9.1 @base
apr-util.x86_64 1.3.9-3.el6_0.1 @base
apr-util-ldap.x86_64 1.3.9-3.el6_0.1 @base
atk.x86_64 1.30.0-1.el6 @base
autoconf.noarch 2.63-5.1.el6 @base
automake.noarch 1.11.1-4.el6 @base
avahi-libs.x86_64 0.6.25-17.el6 @base
basesystem.noarch 10.0-4.el6 @anaconda-CentOS-201703281317.x86_64/6.9
安装一个包试试
[root@localhost yum.repos.d]
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package zeromq.x86_64 0:2.2.0-4.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==================================================================================================================================
Package Arch Version Repository Size
==================================================================================================================================
Installing:
zeromq x86_64 2.2.0-4.el6 base 231 k
Transaction Summary
==================================================================================================================================
Install 1 Package(s)
Total download size: 231 k
Installed size: 871 k
Downloading Packages:
zeromq-2.2.0-4.el6.x86_64.rpm | 231 kB 00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : zeromq-2.2.0-4.el6.x86_64 1/1
Verifying : zeromq-2.2.0-4.el6.x86_64 1/1
Installed:
zeromq.x86_64 0:2.2.0-4.el6
Complete!
[root@localhost yum.repos.d]
如果还不能满足你的需求 觉得易用性很差或者确保 请把repo文件的内容换成如下的部分
[base]
name=CentOS-6
failovermethod=priority
baseurl=https://vault.centos.org/6.9/os/x86_64/
gpgcheck=0
然后 如下操作 就可以正常用了
yum clean all
yum makecache fast
|