解决centos yum安装

  作者:会飞的

问题原因:nginx位于第三方的yum源里面,而不在centos官方yum源里面解决方法:安装epel(ExtraPackagesforEnterpriseLinux)a、去epel网站http://fedoraproject.org/wiki/EPEL下载b、我的系统是centos5.7,cpu是x86_64,所以我下载的是wgethttp://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rp
问题原因:


nginx位于第三方的yum源里面,而不在centos官方yum源里面

解决方法:

安装epel(Extra Packages for Enterprise Linux)

a、去epel网站 http://fedoraproject.org/wiki/EPEL下载

b、我的系统是centos5.7,cpu是x86_64,所以我下载的是wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm

如果是centos6, 则应该下载 wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

c、安装epel

rpm -ivh epel-release-5-4.noarch.rpm

再次执行 yum install nginx,则会提示安装成功了

注:

epel的安装跟centos的系统版本、cpu硬件架构有关,

查看系统版本(lsb-release -a),

查看cpu硬件架构(arch)

epel它是RHEL 的 Fedora 软件仓库,为 RHEL 及衍生发行版如 CentOS、Scientific Linux 等提供高质量软件包的项目。装上了 EPEL,就像在 Fedora 上一样,可以通过 yum install package-name,随意安装软件。


有用  |  无用

猜你喜欢