yum中找不到包时候解决方式

有时候使用yum安装memcached或者redis时候,发现not found package时候,在网络中搜索很一堆方法,发现fedora开源的一个包很好用,那就是epel-release,我们以安装redis为例子
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
[root@nfs-client1 ~]# uname -a
Linux nfs-client1 2.6.18-308.20.1.el5 #1 SMP Tue Nov 13 10:16:17 EST 2012 i686 i686 i386 GNU/Linux
[root@nfs-client1 ~]# cat /etc/redhat-release 
CentOS release 5.8 (Final)
Retrieving http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
warning: /var/tmp/rpm-xfer.lBzWoo: Header V3 DSA signature: NOKEY, key ID 217521f6
Preparing...                ########################################### [100%]
   1:epel-release           ########################################### [100%]
[root@nfs-client1 ~]# yum repolist
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * addons: mirrors.sohu.com
 * base: mirrors.163.com
 * epel: mirrors.ustc.edu.cn
 * extras: mirrors.163.com
 * updates: mirrors.163.com
epel                                                                                                                                  | 3.7 kB     00:00     
epel/primary_db                                                                                                                       | 3.1 MB     00:08     
repo id                                                  repo name                                                                                     status
addons                                                   CentOS-5 - Addons - sohu.com                                                                      0
base                                                     CentOS-5 - Base - sohu.com                                                                    2,725
epel                                                     Extra Packages for Enterprise Linux 5 - i386                                                  5,885
extras                                                   CentOS-5 - Extras - sohu.com                                                                    286
updates                                                  CentOS-5 - Updates - sohu.com                                                                 1,003
repolist: 9,899
[root@nfs-client1 ~]# yum install redis
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * addons: mirrors.sohu.com
 * base: mirrors.163.com
 * epel: mirrors.ustc.edu.cn
 * extras: mirrors.163.com
 * updates: mirrors.163.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package redis.i386 0:2.4.10-1.el5 set to be updated
--> Finished Dependency Resolution
  
Dependencies Resolved
  
=============================================================================================================================================================
 Package                             Arch                               Version                                     Repository                          Size
=============================================================================================================================================================
Installing:
 redis                               i386                               2.4.10-1.el5                                epel                               299 k
  
Transaction Summary
=============================================================================================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)
  
Total download size: 299 k
Is this ok [y/N]:  -- ok 问题解决
 下面有EPEL解释

1. 什么是企业版 Linux 附加软件包(EPEL)?

企业版 Linux 附加软件包(以下简称 EPEL)是一个由特别兴趣小组创建、维护并管理的,针对 红帽企业版 Linux(RHEL)及其衍生发行版(比如 CentOS、 Scientific Linux)的一个高质量附加软件包项目。

EPEL 的软件包通常不会与企业版 Linux 官方源中的软件包发生冲突,或者互相替换文件。EPEL 与 Fedora 项目基本一致,包含完整的构建系统、升级管理器、镜像管理器等等。

您可以到任意一台 EPEL 镜像服务器的目录查看:点击此处查看 EPEL 镜像的列表

或者您也可以使用 repoview 来查看:

EPEL 6: i386, x86_64, ppc64, sources
EPEL 5: i386, x86_64, ppc, sources
我怎样获取 EPEL 的软件包?

EPEL 包含一个叫做'epel-release'的包,这个包包含了 EPEL 源的 gpg 密钥和软件源信息。您可以通过 yum 安装到您的企业版 Linux 发行版上。除了 epel-release 源,还有一个叫做'epel-testing'的源,这个源包含最新的测试软件包,其版本很新但是安装有风险,请自行斟酌。

注意:
RHN 用户请注意
您也许需要启用某些'可选择的'源来安装依赖组件。这里 有一个针对 RHN 的教程。
如果您使用第6版企业版 Linux,请安装这个 RPM 包: epel-release-6-5.noarch.rpm  http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm

如果您使用第5版企业版 Linux,请安装这个 RPM 包: epel-release-5-4.noarch.rpm

http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

您可以通过: Fedora 项目公钥列表 页面来验证 EPEL 源所有包的签名。





posted on 2013-01-10 13:59  DJ IN MUSIC  阅读(2028)  评论(0编辑  收藏  举报

导航