yum 安裝軟件失敗

遇到的錯誤

[root@DBTEST ~]# yum install zabbix-agent -y
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: mirrors.njupt.edu.cn
 * extras: mirrors.aliyun.com
 * updates: mirrors.njupt.edu.cn
Setting up Install Process
Nothing to do

複製代碼

解決方法

  1. 肯定機器能聯網,ping 百度。
  2. 更換系統 yum 源。
// 備份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

// CentOS 6 下載
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

// 更改CentOS-Media.repo使其爲不生效:(本機已是不生效)
enabled=0

// 運行yum makecache生成緩存
yum clean all
yum makecache
複製代碼
相關文章
相關標籤/搜索