注:如果 yum 没有找到包,那么执行以下操作
- 方法一
添加源:
vi /etc/yum.repos.d/nux-misc.repo[nux-misc] name=Nux Misc baseurl=http://li.nux.ro/download/nux/misc/el7/x86_64/ enabled=0 gpgcheck=1 gpgkey=http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro安装:
yum --enablerepo=nux-misc install 包名
注--enablerepo=nux-misc是指定使用nux-misc.repo的源,不加这个参数,就会使用/etc/yum.repos.d/目录下的所有源
- 方法二:
添加源:
yum install epel-release
- 更新源缓存
yum clean all
yum makecache
-
repo中$releasever的含义
rpm -qi centos-release
image.png
其中Version就是$releasever

image.png







网友评论