我们想要将ansible脱机安装在流变7.6机器上(参考- https://www.linuxschoolonline.com/how-to-install-ansible-offline-on-centos-or-redhat/ )
Ansible需要以下先决条件才能出现在系统中
python-crypto
python-httplib
python-jinja2
python-keyczar
sshpass所以我们用yum安装所有要求的rpm
我们可以看到它失败了
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只要注意-我们是注册到红帽7.x储存库,我们不确定从哪里我们需要从哪里采取丢失的rpm,以及为什么流变回购不包括所有要求的rpm?
安装所有这些所需的rpm的建议是什么?
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
**********************************************************************发布于 2020-05-11 16:36:24
您正在尝试安装两个版本的python-keyczar,其中一个版本用于Mageia;这就是破坏事务的原因。
通常,要确定脱机安装所需的包,应从基线和跑开始。
sudo yum install --downloadonly --downloaddir=<directory> <package>它将把所有必需的包下载到指定的目录中。
在Ansible的例子中,您可以使用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这将将所有需求下载到/tmp/ansible-packages中。然后,您可以将包复制到其他系统(假设您在RHEL订阅中有适当数量的单元)并使用yum localinstall安装它们。
https://unix.stackexchange.com/questions/585943
复制相似问题