1. 程式人生 > >阿裏雲ECS服務器 Centos7.2 使用 yum 安裝 ansible 報錯

阿裏雲ECS服務器 Centos7.2 使用 yum 安裝 ansible 報錯

cache centos7.2 連接 ESS epo shadow ges 服務器 proc

#####################使用阿裏雲的ECS服務器Centos7.2系統安裝ansible提示安裝不上###########
原因
通過Yum安裝最新發布版本
通過Yum安裝RPMs適用於 EPEL 6, 7, 以及仍在支持中的Fedora發行版.
托管節點的操作系統版本可以是更早的版本(如 EL5), 但必須安裝 Python 2.4 或更高版本的Python.
Fedora 用戶可直接安裝Ansible, 但RHEL或CentOS用戶,需要 配置 EPEL
連接地址:https://fedoraproject.org/wiki/EPEL
配置EPEL
技術分享圖片
點擊epel-release-latest-7
即可下載到本地。

將此rpm包安裝上傳到服務器中,直接安裝
#yum clean all
#yum makecache

提示如下錯誤:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
ansible-2.6.4-1.el7.noarch.rpm FAILED
http://mirrors.aliyun.com/epel/7/x86_64/Packages/a/ansible-2.6.4-1.el7.noarch.rpm: [Errno 14] HTTP Error 404 - Not Found

Trying other mirror.
To address this issue please refer to the below wiki article
https://wiki.centos.org/yum-errors
If above article doesn‘t help to resolve this issue please use https://bugs.centos.org/.
Error downloading packages:
ansible-2.6.4-1.el7.noarch: [Errno 256] No more mirrors to try.
原因:是因為配置 epel.repo 源的問題
調整方法:
#cd /etc/yum.repos.d/
# mv epel.repo epel.repo.bak

#yum clean all
#yum makecache

Metadata Cache Created
$ sudo yum -y install ansible
Complete!
###########################################解決###################################################

阿裏雲ECS服務器 Centos7.2 使用 yum 安裝 ansible 報錯