
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
そこで、必要なlibodbcファイルを含むunixodbcを手動でインストールし、実行してみました。
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
プラグインをお勧めします保護ベースこのプラグインは、複数のサードパーティリポジトリを扱う場合や、EPEL/RPMForge
以下を使用できます:
yum --disablerepo=[reponame] update
しかし、これは使い捨てのオプションです。システムを継続的に保護したい場合は、「protectbase」を強くお勧めします。
"yum install yum-plugins-protectbase"
次に、"protect=1"
保護したいリポジトリを追加します。別名 CentOS-Base そして、protect=0
epel.repo に " " を追加すると、サードパーティのリポジトリを扱うときによくある競合のほとんどが解決されます。
こちらのブログでより詳しいガイドを作成しました。複数のリポジトリを扱うCentOS 4/5/6/7
答え2
古い質問に答えますが、誰かがこれに遭遇した場合に備えて:
答えは、unixODBC
パッケージが「rhel-7-server-rpms」RHEL チャネルの一部である依存関係を提供しているが、ホスト上で有効になっていないように見えるということです。