Question:
I am try to install the ansible tool on my linux red-hat version – 5.7
1 2 3 4 5 6 |
yum install ansible Loaded plugins: security Setting up Install Process No package ansible available. Nothing to do |
ansible isnt installed on my linux machine – for sure!
so why I get – No package ansible available. and how to resolve this?
the view from yum.repos.d is:
1 2 3 |
/etc/yum.repos.d]# ls rhel-debuginfo.repo rhel-source.repo service-cd-repo.repo stp-default- repo.repo |
I have resolving as the following:
1 2 3 4 |
ping 8.8.8.8 PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. 64 bytes from 8.8.8.8: icmp_seq=1 ttl=50 time=63.4 ms |
Update – try to install epel-release package
1 2 3 4 5 6 7 8 |
yum install epel-release Loaded plugins: security service-cd | 951 B 00:00 swp-default | 951 B 00:00 Setting up Install Process No package epel-release available. Nothing to do |
second update:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
wget --no-check-certificate https://dl.fedoraproject.org/pub/epel/epel- release-latest-5.noarch.rpm --2015-08-17 14:54:20-- https://dl.fedoraproject.org/pub/epel/epel- release-latest-5.noarch.rpm Resolving dl.fedoraproject.org... 209.132.181.26, 209.132.181.27, 209.132.181.25, ... Connecting to dl.fedoraproject.org|209.132.181.26|:443... connected. WARNING: cannot verify dl.fedoraproject.org's certificate, issued by `/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 Hig: Unable to locally verify the issuer's authority. HTTP request sent, awaiting response... 200 OK Length: 12232 (12K) [application/x-rpm] Saving to: `epel-release-latest-5.noarch.rpm' 100% [==========================================================================================>] 12,232 54.0K/s in 0.2s 2015-08-17 14:54:22 (54.0 KB/s) - `epel-release-latest-5.noarch.rpm.1' saved [12232/12232] rpm -ivh epel-release-latest-5.noarch.rpm warning: epel-release-latest-5.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 217521f6 Preparing... ########################################### [100%] yum repolist Loaded plugins: security epel | 3.7 kB 00:00 service-cd | 951 B 00:00 swp-default | 951 B 00:00 repo id repo name status epel Extra Packages for Enterprise Linux 5 - i386 5,411 service-cd RHEL5 service-cd repository 155 swp-default RHEL5 yum repository 239 repolist: 5,805 yum install ansible Loaded plugins: security Setting up Install Process No package ansible available. Nothing to do |
Answer:
Ansible is part of the Extra Packages for Enterprise Linux (EPEL) repository so you need to install epel-release package first
1 2 |
$ sudo yum install epel-release |
The repo should now be visible in the repo list
1 2 |
$ sudo yum repolist |
So now you can go ahead and install ansible
1 2 |
$ sudo yum install ansible |
Before RHEL 7.x, the installtion needed to be done manually.
Open install epel-release package and download the newest version of epel-release for EL5 or follow the commands below
1 2 3 4 5 |
$ wget https://archives.fedoraproject.org/pub/archive/epel/5/x86_64/epel-release-5-4.noarch.rpm $ sudo rpm –ivh epel-release-latest-5.noarch.rpm $ sudo yum repolist $ sudo yum install ansible |
In the installation manual for ansible, this is referred to as configure EPEL
Hope this helps 🙂
Response to second update
When installing manually you may also need to expire your cache and recreate the the local repository database before you can install software from EPEL. That can be done with the following
1 2 3 |
$ yum clean expire-cache $ yum createrepo |