背景
EPEL (Extra Packages for Enterprise Linux) 是Fedora小组维护的一个软件仓库项目,提供了官方源不支持的或者官方更新缓慢的包,很多开源软件需要用epel
源进行安装,do it.
安装
1.查看已有源,sudo yum repolist
Loading mirror speeds from cached hostfile
* epel: mirror.sjc02.svwh.net
2.卸载。如果已有epel 源
但不可用并且问题不好定位,则执行yum -y remove epel-release
卸载旧版
3.安装epel源
; centos7就选`latest-7`,同理6选latest-6
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
4.安装rpm
sudo yum install epel-release-latest-7.noarch.rpm
5.检查版本:
rpm -q epel-release
其他
-
yum repo
的路径为/etc/yum.repos.d
-
epel.repo
的文件内容如下,如果需要关闭某个源,则将配置文件中的enabled
置为0
[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch/debug
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/7/SRPMS
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。