1

we want to installs the ansible OFF-LINE on rhel 7.6 machine ( refrence - https://www.linuxschoolonline.com/how-to-install-ansible-offline-on-centos-or-redhat/ )

Ansible needs the following prerequisites to be present on the system

python-crypto
python-httplib
python-jinja2
python-keyczar
sshpass

so we install by yum all the requested rpm's

as we can see its failed about

Error: Package: python-keyczar-0.71c-8.mga7.noarch (/python-keyczar-0.71c-8.mga7.noarch)
           Requires: python2.7dist(pyasn1)
Error: Package: python-keyczar-0.71c-8.mga7.noarch (/python-keyczar-0.71c-8.mga7.noarch)
           Requires: python2.7dist(pycrypto) > 2.0

just note - we are registered to redhat 7.x repository and we not sure from where we need to take the missing rpm's , and why rhel repo not include all required rpm's ?

what is the suggestion to installed all these required rpm's?

yum localinstall -y  python-keyczar-0.71c-2.el7.noarch.rpm  sshpass-1.06-2.el7.x86_64.rpm python2-crypto-2.6.1-15.el7.x86_64.rpm python-httplib2-0.9.2-1.el7.noarch.rpm python-jinja2-2.7.2-4.el7.noarch.rpm python-keyczar-0.71c-8.mga7.noarch.rpm

Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
Examining python-keyczar-0.71c-2.el7.noarch.rpm: python-keyczar-0.71c-2.el7.noarch
Marking python-keyczar-0.71c-2.el7.noarch.rpm to be installed
Examining sshpass-1.06-2.el7.x86_64.rpm: sshpass-1.06-2.el7.x86_64
sshpass-1.06-2.el7.x86_64.rpm: does not update installed package.
Examining python2-crypto-2.6.1-15.el7.x86_64.rpm: python2-crypto-2.6.1-15.el7.x86_64
Marking python2-crypto-2.6.1-15.el7.x86_64.rpm to be installed
Examining python-httplib2-0.9.2-1.el7.noarch.rpm: python-httplib2-0.9.2-1.el7.noarch
Marking python-httplib2-0.9.2-1.el7.noarch.rpm as an update to python-httplib2-0.9.1-2.1.el7.noarch
Examining python-jinja2-2.7.2-4.el7.noarch.rpm: python-jinja2-2.7.2-4.el7.noarch
Marking python-jinja2-2.7.2-4.el7.noarch.rpm as an update to python-jinja2-2.7.2-3.el7_6.noarch
Examining python-keyczar-0.71c-8.mga7.noarch.rpm: python-keyczar-0.71c-8.mga7.noarch
Marking python-keyczar-0.71c-8.mga7.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package python-httplib2.noarch 0:0.9.1-2.1.el7 will be updated
---> Package python-httplib2.noarch 0:0.9.2-1.el7 will be an update
---> Package python-jinja2.noarch 0:2.7.2-3.el7_6 will be updated
---> Package python-jinja2.noarch 0:2.7.2-4.el7 will be an update
---> Package python-keyczar.noarch 0:0.71c-2.el7 will be installed
---> Package python-keyczar.noarch 0:0.71c-8.mga7 will be installed
--> Processing Dependency: python2.7dist(pycrypto) > 2.0 for package: python-keyczar-0.71c-8.mga7.noarch
--> Processing Dependency: python2.7dist(pyasn1) for package: python-keyczar-0.71c-8.mga7.noarch
---> Package python2-crypto.x86_64 0:2.6.1-15.el7 will be installed
--> Processing Dependency: libtomcrypt.so.0()(64bit) for package: python2-crypto-2.6.1-15.el7.x86_64
--> Running transaction check
---> Package libtomcrypt.x86_64 0:1.17-26.el7 will be installed
--> Processing Dependency: libtommath >= 0.42.0 for package: libtomcrypt-1.17-26.el7.x86_64
--> Processing Dependency: libtommath.so.0()(64bit) for package: libtomcrypt-1.17-26.el7.x86_64
---> Package python-keyczar.noarch 0:0.71c-8.mga7 will be installed
--> Processing Dependency: python2.7dist(pycrypto) > 2.0 for package: python-keyczar-0.71c-8.mga7.noarch
--> Processing Dependency: python2.7dist(pyasn1) for package: python-keyczar-0.71c-8.mga7.noarch
--> Running transaction check
---> Package libtommath.x86_64 0:0.42.0-6.el7 will be installed
---> Package python-keyczar.noarch 0:0.71c-8.mga7 will be installed
--> Processing Dependency: python2.7dist(pycrypto) > 2.0 for package: python-keyczar-0.71c-8.mga7.noarch
--> Processing Dependency: python2.7dist(pyasn1) for package: python-keyczar-0.71c-8.mga7.noarch
--> Finished Dependency Resolution
Error: Package: python-keyczar-0.71c-8.mga7.noarch (/python-keyczar-0.71c-8.mga7.noarch)
           Requires: python2.7dist(pyasn1)
Error: Package: python-keyczar-0.71c-8.mga7.noarch (/python-keyczar-0.71c-8.mga7.noarch)
           Requires: python2.7dist(pycrypto) > 2.0
**********************************************************************
yum can be configured to try to resolve such errors by temporarily enabling
disabled repos and searching for missing dependencies.
To enable this functionality please set 'notify_only=0' in /etc/yum/pluginconf.d/search-disabled-repos.conf
**********************************************************************
1
  • Which direction is this post going? The word "offline" implies that you are disconnected from the RHEL repositories; it's reinforced by the fact that you've downloaded RPMs and are running "yum localinstall". I suggest editing the Q to remove the distracting "why rhel repo not include all required rpms?". – Jeff Schaller May 11 '20 at 16:37
2

You’re trying to install two versions of python-keyczar, one of which is for Mageia; that’s what’s breaking the transaction.

In general, to figure out what packages are required for an offline installation, you should start from your baseline, and run

sudo yum install --downloadonly --downloaddir=<directory> <package>

which will download all the required packages to the named directory.

In Ansible’s case, you’d follow the installation instructions for RHEL 7:

sudo subscription-manager repos --enable rhel-7-server-ansible-2.9-rpms
mkdir /tmp/ansible-packages
sudo yum install --downloadonly --downloaddir=/tmp/ansible-packages ansible

This will download all the requirements to /tmp/ansible-packages. You can then copy the packages to other systems (assuming you have the appropriate number of units in your RHEL subscription) and install them using yum localinstall.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.