您的位置:首页 > 运维架构 > Linux

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

2012-10-08 15:28 555 查看
  在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
..........

..........

顺利完成安装。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: