Centosyum安装软件NopackageXXXavailable-创新互联
安装xxpackage时,出现 NO package bind available如下所示:
网页名称:Centosyum安装软件NopackageXXXavailable-创新互联
本文网址:http://myzitong.com/article/jgegh.html
[root@host /]# yum -y install bind
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
Setting up Install Process
No package bind available.
用yum安装软件习惯了,感觉是把下载的哪个配置文件给弄坏了。于是在网上查资料终于找到了原因:Centos中有一个配置文件专门存各种软件下载信息,用yum安装时会自动找到软件镜像站点。听说好几千个。输入以下路径看下:
ls /etc/yum.repos.d/
我们会看到一个文件
CentOS-Base.repo
输入命令行
cat CentOS-Base.repo
结果为空。
首先备份/etc/yum.repos.d/CentOS-Base.repo
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup下载对应版本repo文件, 放入/etc/yum.repos.d/(操作前请做好相应备份)
运行yum makecache生成缓存。
===========================================================
CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repoCentOS 5
- wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
网页名称:Centosyum安装软件NopackageXXXavailable-创新互联
本文网址:http://myzitong.com/article/jgegh.html