No package ansible available.Error: Nothing to do

Update yum at the first place

yum update -y

Use wget to send a pull request from the epel package site to download the rpm

[root@tibero tibero]# wget https://archives.fedoraproject.org/pub/archive/epel/5                                      /x86_64/epel-release-5-4.noarch.rpm
--2021-06-04 00:41:51--  https://archives.fedoraproject.org/pub/archive/epel/5/x                                      86_64/epel-release-5-4.noarch.rpm
Resolving archives.fedoraproject.org... 38.145.60.22, 38.145.60.23, 38.145.60.24
Connecting to archives.fedoraproject.org|38.145.60.22|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12232 (12K) [application/x-rpm]
Saving to: “epel-release-5-4.noarch.rpm”

100%[======================================>] 12,232      --.-K/s   in 0.007s

2021-06-04 00:41:53 (1.63 MB/s) - “epel-release-5-4.noarch.rpm” saved [12232/122                                      32]

Install epel rpm which was downloaded

[root@tibero tibero]# rpm -Uvh epel-release-5-4.noarch.rpm
warning: epel-release-5-4.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 217521f6: NOKEY
Preparing...                ########################################### [100%]
   1:epel-release           ########################################### [100%]

List all the repositories. Now you should see epel 5 enabled which is bold

[root@tibero tibero]# yum repolist all
Loaded plugins: security, ulninfo
epel                                                                                           | 3.6 kB     00:00
epel/primary_db                                                                                | 2.8 MB     00:02
repo id                       repo name                                                                status
epel                          Extra Packages for Enterprise Linux 5 - x86_64                           enabled:  6,428
epel-debuginfo                Extra Packages for Enterprise Linux 5 - x86_64 - Debug                   disabled
epel-source                   Extra Packages for Enterprise Linux 5 - x86_64 - Source                  disabled
epel-testing                  Extra Packages for Enterprise Linux 5 - Testing - x86_64                 disabled
epel-testing-debuginfo        Extra Packages for Enterprise Linux 5 - Testing - x86_64 - Debug         disabled
epel-testing-source           Extra Packages for Enterprise Linux 5 - Testing - x86_64 - Source        disabled
public_ol6_MySQL              MySQL 5.5 for Oracle Linux 6 (x86_64)                                    disabled
public_ol6_MySQL56            MySQL 5.6 for Oracle Linux 6 (x86_64)                                    disabled
public_ol6_UEKR3_latest       Unbreakable Enterprise Kernel Release 3 for Oracle Linux 6Server (x86_64 enabled:  1,270
public_ol6_UEK_base           Unbreakable Enterprise Kernel for Oracle Linux 6Server (x86_64)          disabled
public_ol6_UEK_latest         Latest Unbreakable Enterprise Kernel for Oracle Linux 6Server (x86_64)   disabled
public_ol6_addons             Oracle Linux 6Server Add ons (x86_64)                                    disabled
public_ol6_ga_base            Oracle Linux 6Server GA installation media copy (x86_64)                 disabled
public_ol6_gdm_multiseat      Oracle Linux 6 GDM Multiseat (x86_64)                                    disabled
public_ol6_latest             Oracle Linux 6Server Latest (x86_64)                                     enabled: 12,932
public_ol6_ofed_UEK           OFED supporting tool packages for Unbreakable Enterprise Kernel on Oracl disabled
public_ol6_playground_latest  Latest mainline stable kernel for Oracle Linux 6 (x86_64) - Unsupported  disabled
public_ol6_spacewalk20_client Spacewalk Client 2.0 for Oracle Linux 6 (x86_64)                         disabled
public_ol6_spacewalk20_server Spacewalk Server 2.0 for Oracle Linux 6 (x86_64)                         disabled
public_ol6_u1_base            Oracle Linux 6Server Update 1 installation media copy (x86_64)           disabled
public_ol6_u2_base            Oracle Linux 6Server Update 2 installation media copy (x86_64)           disabled
public_ol6_u3_base            Oracle Linux 6Server Update 3 installation media copy (x86_64)           disabled
public_ol6_u4_base            Oracle Linux 6Server Update 4 installation media copy (x86_64)           disabled
public_ol6_u5_base            Oracle Linux 6Server Update 5 installation media copy (x86_64)           disabled
public_ol6_u6_base            Oracle Linux 6Server Update 6 installation media copy (x86_64)           disabled
public_ol6_u7_base            Oracle Linux 6Server Update 7 installation media copy (x86_64)           disabled
repolist: 20,630

Create a repo file called ansible.repo

[root@tibero yum.repos.d]# touch ansible.repo
[root@tibero yum.repos.d]# vi ansible.repo
[root@tibero yum.repos.d]#



Paste the configuration inside the file

[root@tibero yum.repos.d]# cat ansible.repo

[Ansible]
name = ansible
baseurl = https://releases.ansible.com/ansible/rpm/release/epel-7-x86_64/
enabled = 1
gpgcheck = 0

Now try to install ansible

[root@tibero yum.repos.d]# yum install ansible -y --skip-broken
Loaded plugins: security, ulninfo
Setting up Install Process
Ansible                                                                                        | 2.9 kB     00:00
Ansible/primary_db                                                                             |  88 kB     00:00
Resolving Dependencies
--> Running transaction check
---> Package ansible.noarch 0:2.9.22-1.el7.ans will be installed
--> Processing Dependency: python(abi) = 2.7 for package: ansible-2.9.22-1.el7.ans.noarch
--> Processing Dependency: sshpass for package: ansible-2.9.22-1.el7.ans.noarch

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s