当我们在linux上, 使用yum 安装包时,报错如下:
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Install Process
Nothing to do
这时我们需要安装EPEL
EPEL,即Extra Packages for Enterprise Linux,这个软件仓库里有很多非常常用的软件,而且是专门针对RHEL设计的,对RHEL标准yum源是一个很好的补充,完全免费使用,由Fedora项目维护,所以如果你使用的是RHEL
从官网下载 EPEL, 安装
下载:(RHEL/CentOS 5 32-64 Bit)
wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
安装:
rpm -ivh epel-release-5-4.noarch.rpm
配置:
在 /etc/yum.repos.d/下 创建epel.repo
[epel-source]域下的enabled=0也改成enabled=1
enabled=
gpgcheck=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL [epel-debuginfo]
name=Extra Packages for Enterprise Linux - $basearch - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch/debug
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-debug-5&arch=$basearch
failovermethod=priority
enabled=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
gpgcheck= [epel-source]
name=Extra Packages for Enterprise Linux - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/5/SRPMS
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-source-5&arch=$basearch
failovermethod=priority
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
gpgcheck=
卸载 EPEL:
[root@test ~]# rpm -e epel-release