没有可用软件包
原因:所用的软件包在第三方的yum源里面,而不在官方yum源里面。
(常在centos6和centos7上)注意方法中的Centos-7.repo
解决方法1(使用epel源):
//安装epel源
sudo yum install epel-release
清理缓存
yum clean all
重新生成缓存
yum makecache
更新yum源
yum update
解决方法2(使用阿里云源):
//下载阿里云源
wget -O /etc/yum.repos.d/CentOS-Base-epel.repo http://mirrors.aliyun.com/repo/Centos-7.repo
清理缓存
yum clean all
重新生成缓存
yum makecache
更新yum源
yum update
解决方法3(使用网易源):
//下载网易源
wget -P /etc/yum.repos.d http://mirrors.163.com/.help/CentOS7-Base-163.repo
清理缓存
yum clean all
重新生成缓存
yum makecache
更新yum源
yum update
国内的一些好用的yum源
(使用方法,内详)
阿里云yum源
https://opsx.alibaba.com/mirrorhttps://opsx.alibaba.com/mirror
网易yum源
http://mirrors.163.com/.help/http://mirrors.163.com/.help/
中科大yum源
https://lug.ustc.edu.cn/wiki/mirrors/helphttps://lug.ustc.edu.cn/wiki/mirrors/help
sohu yum源
http://mirrors.sohu.com/help/http://mirrors.sohu.com/help/
清华大学yum源
https://mirrors.tuna.tsinghua.edu.cn/https://mirrors.tuna.tsinghua.edu.cn/
浙大yum源