错误现象
[root@c1 ~]# yum -y install openstack-keystone
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
abc | 3.6 kB 00:00:00
没有可用软件包 openstack-keystone。
错误:无须任何处理
解决方法
- 配置安装阿里云yum源
下载阿里云
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 uptade
- 配置安装网易yum源
下载网易源
wget -P /etc/yum.repos.d http://mirrors.163.com/.help/CentOS7-Base-163.repo
清理缓存
yum clean all
重新生成缓存
yum makecache
升级yum源
yum uptade
- 安装epel源
安装epel源
sudo yum install epel-release
清理缓存
yum clean all
重新生成缓存
yum makecache
升级yum源
yum uptade
总结
以上的方法适用于Centos7的系统,Linux系统中使用yum安装软件时提示 “没有可用软件包”时,代表在linux系统yum源中已经没有对应的安装包了,因此我们需要额外安装yum源。