百勝跳過損壞的問題

百勝跳過損壞的問題

我正在嘗試使用 yum 安裝 mysql-connector-odbc。它給了我這個錯誤。

Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package mysql-connector-odbc.x86_64 0:5.3.6-1.el7 will be installed
--> Processing Dependency: libodbcinst.so.2()(64bit) for package: mysql-connector-odbc-5.3.6-1.el7.x86_64
--> Processing Dependency: libodbc.so.2()(64bit) for package: mysql-connector-odbc-5.3.6-1.el7.x86_64
--> Finished Dependency Resolution
Error: Package: mysql-connector-odbc-5.3.6-1.el7.x86_64 (mysql-connectors-community)
           Requires: libodbc.so.2()(64bit)
Error: Package: mysql-connector-odbc-5.3.6-1.el7.x86_64 (mysql-connectors-community)
           Requires: libodbcinst.so.2()(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

所以我手動安裝了 unixodbc,其中包含所需的 libodbc 文件,並嘗試運行它

yum install mysql-connector-odbc --skip-broken

這給了我另一個錯誤。

Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package mysql-connector-odbc.x86_64 0:5.3.6-1.el7 will be installed
--> Processing Dependency: libodbcinst.so.2()(64bit) for package: mysql-connector-odbc-5.3.6-1.el7.x86_64
--> Processing Dependency: libodbc.so.2()(64bit) for package: mysql-connector-odbc-5.3.6-1.el7.x86_64

Packages skipped because of dependency problems:
    mysql-connector-odbc-5.3.6-1.el7.x86_64 from mysql-connectors-community

我不確定我在這裡做錯了什麼。

答案1

我推薦這個CentOS插件保護基地這個插件在處理多個第 3 方存儲庫或只是EPEL/RPMForge

您可以使用:

yum --disablerepo=[reponame] update

但這是一次性選項,如果您想持續保護您的系統,那麼我強烈推薦“protectbase”

"yum install yum-plugins-protectbase"

然後添加"protect=1"您想要保護的存儲庫。又稱 CentOS-Base 並將「protect=0」新增至 epel.repo 這應該可以解決處理第 3 方儲存庫時最常見的衝突。

我在我的部落格上創建了更深入的指南處理多個儲存庫CentOS 4/5/6/7

答案2

回答一個老問題,但萬一有人遇到這個問題:

答案是該unixODBC軟體包提供了這些依賴項,它們是「rhel-7-server-rpms」RHEL 通道的一部分,該通道似乎未在主機上啟用。

相關內容