我们有 rhel 服务器版本7.2
我们打算安装最新ansible
版本以及所有其他 rpm(因为 rpm 依赖性)
转速-ansible-2.9.7-1.el7ae.noarch.rpm
yum localinstall -y *
在安装结束时 yum 返回并显示以下错误'
Transaction check error:
file /etc/krb5.conf from install of krb5-libs-1.15.1-46.el7.x86_64 conflicts with file from package krb5-libs-1.13.2-10.el7.i686
file /usr/share/man/man5/k5identity.5.gz from install of krb5-libs-1.15.1-46.el7.x86_64 conflicts with file from package krb5-libs-1.13.2-10.el7.i686
file /usr/share/man/man5/k5login.5.gz from install of krb5-libs-1.15.1-46.el7.x86_64 conflicts with file from package krb5-libs-1.13.2-10.el7.i686
file /usr/share/man/man5/krb5.conf.5.gz from install of krb5-libs-1.15.1-46.el7.x86_64 conflicts with file from package krb5-libs-1.13.2-10.el7.i686
file /usr/share/locale/es/LC_MESSAGES/ecpglib6-9.2.mo from install of postgresql-libs-9.2.24-2.el7_7.x86_64 conflicts with file from package postgresql-libs-9.2.13-1.el7_1.i686
file /usr/share/locale/fr/LC_MESSAGES/ecpglib6-9.2.mo from install of postgresql-libs-9.2.24-2.el7_7.x86_64 conflicts with file from package postgresql-libs-9.2.13-1.el7_1.i686
file /usr/share/locale/ru/LC_MESSAGES/ecpglib6-9.2.mo from install of postgresql-libs-9.2.24-2.el7_7.x86_64 conflicts with file from package postgresql-libs-9.2.13-1.el7_1.i686
file /usr/share/locale/de/LC_MESSAGES/libpq5-9.2.mo from install of postgresql-libs-9.2.24-2.el7_7.x86_64 conflicts with file from package postgresql-libs-9.2.13-1.el7_1.i686
file /usr/share/locale/es/LC_MESSAGES/libpq5-9.2.mo from install of postgresql-libs-9.2.24-2.el7_7.x86_64 conflicts with file from package postgresql-libs-9.2.13-1.el7_1.i686
file /usr/share/locale/fr/LC_MESSAGES/libpq5-9.2.mo from install of postgresql-libs-9.2.24-2.el7_7.x86_64 conflicts with file from package postgresql-libs-9.2.13-1.el7_1.i686
file /usr/share/locale/it/LC_MESSAGES/libpq5-9.2.mo from install of postgresql-libs-9.2.24-2.el7_7.x86_64 conflicts with file from package postgresql-libs-9.2.13-1.el7_1.i686
file /usr/share/locale/pt_BR/LC_MESSAGES/libpq5-9.2.mo from install of postgresql-libs-9.2.24-2.el7_7.x86_64 conflicts with file from package postgresql-libs-9.2.13-1.el7_1.i686
file /usr/share/locale/ru/LC_MESSAGES/libpq5-9.2.mo from install of postgresql-libs-9.2.24-2.el7_7.x86_64 conflicts with file from package postgresql-libs-9.2.13-1.el7_1.i686
file /usr/share/locale/zh_CN/LC_MESSAGES/libpq5-9.2.mo from install of postgresql-libs-9.2.24-2.el7_7.x86_64 conflicts with file from package postgresql-libs-9.2.13-1.el7_1.i686
file /usr/share/locale/zh_TW/LC_MESSAGES/libpq5-9.2.mo from install of postgresql-libs-9.2.24-2.el7_7.x86_64 conflicts with file from package postgresql-libs-9.2.13-1.el7_1.i686
根据红帽(https://access.redhat.com/solutions/158883) ,我们添加以下行yum.conf
exclude=kernel*,*.i686
exactarchlist=*
所以我们这样做(根据redhat)
# package-cleanup --dupes
Loaded plugins: langpacks, product-id
# package-cleanup --cleandupes
Loaded plugins: langpacks, product-id
No duplicates to remove
# tail -2 /etc/yum.conf
exclude=kernel*,*.i686
exactarchlist=*
但我们仍然得到同样的结果Transaction check error:
知道如何解决这种情况吗?
注意 - ansible ( ansible-2.9.7-1.el7ae.noarch.rpm ) 已成功安装在 rhel 7.6 上(但未在 rhel 7.2 上安装)
答案1
错误如
file /etc/krb5.conf from install of krb5-libs-1.15.1-46.el7.x86_64 conflicts with file from package krb5-libs-1.13.2-10.el7.i686
发生这种情况是因为不同架构的包必须为它们提供的文件提供相同的内容,IE它们必须是相同的版本。
这里有许多旧版本的软件包,最初在 RHEL 7.2 中提供,与当前可用的版本冲突。要安装 的更新包x86_64
,您必须同时安装 的更新的等效项i686
。
最简单的选择是让您的系统保持最新状态,但我知道这不适合您。您必须i686
从与您的软件包相同的存储库下载软件包x86_64
并同时安装它们。确保只下载有冲突的包;您只需要升级已安装的软件包,无需安装i686
Ansible 安装集中所有软件包的变体。