CentOS下yum找不到安装软件的解决方法。

piaoling  2013-09-27 11:49:27
在centos下用yum安装新软件是,yum有时候会提示找不到相应的软件(当然可以用源码安装来解决问题,不过这个需要手动解决依赖问题,比较麻烦。)。这时可以到https://fedoraproject.org/wiki/EPEL的子栏目:"How can I use these extra packages?", 到一个和系统相关的epel-release。然后用rpm安装epel-release包,再重新yum install就可以了。附上记录,方便以后解决同类问题。

#yum install git
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository addons is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
Setting up Install Process
No package git available.
Nothing to do

#su -c 'rpm -Uvh http://mirrors.sohu.com/fedora-epel/5/i386/epel-release-5-4.noarch.rpm'

或者

#sudo rpm -Uvh http://mirrors.sohu.com/fedora-epel/5/i386/epel-release-5-4.noarch.rpm

[root@glfs1 ~]# yum install git
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository addons is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * epel: mirrors.sohu.com
epel                                                                                                                  | 3.7 kB     00:00     
epel/primary_db                                                                                                       | 3.8 MB     00:00     
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package git.x86_64 0:1.7.4.1-1.el5 set to be updated
--> Processing Dependency: perl-Git = 1.7.4.1-1.el5 for package: git
--> Processing Dependency: perl(Error) for package: git
--> Processing Dependency: perl(Git) for package: git
--> Running transaction check
---> Package perl-Error.noarch 1:0.17010-1.el5 set to be updated
---> Package perl-Git.x86_64 0:1.7.4.1-1.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved
..........

..........

顺利完成安装。


from:http://www.cnblogs.com/linbaiye/archive/2012/10/08/2715344.html

类别 :  默认(751)  |  浏览(5761)  |  评论(0)
发表评论(评论将通过邮件发给作者):

Email: