Rhel

rhel 7.2 出現事務檢查錯誤:安裝 ansible 時

  • May 12, 2020

我們有 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

根據redhat(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 上)

錯誤如

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

發生是因為不同架構的包必須為它們都提供的文件提供相同的內容,它們必須是相同的版本。

在這裡,您有許多舊版本的軟體包,它們最初在 RHEL 7.2 中提供,與目前可用的版本相衝突。要安裝 的更新包x86_64,您必須同時安裝 的更新等效項i686

最簡單的選擇是讓您的系統保持最新,但我知道這不是您的選擇。您必須i686從與您的軟體包相同的儲存庫下載x86_64軟體包並同時安裝它們。確保只下載有衝突的包;您只需要升級已安裝的i686軟體包,無需安裝 Ansible 安裝集中所有軟體包的變體。

引用自:https://unix.stackexchange.com/questions/586139