【環境】
CentOS Linux release 7.6.1810 (Core)
発端は、、、
yum update している途中で、うっかりターミナルを閉じてしまった(´・ω・`)
再びログインして、 yum update するとエラーが発生した。
# yum update 読み込んだプラグイン:fastestmirror Loading mirror speeds from cached hostfile * base: ftp.yz.yamagata-u.ac.jp * epel: ftp.yz.yamagata-u.ac.jp * extras: ftp.yz.yamagata-u.ac.jp * updates: ftp.yz.yamagata-u.ac.jp 依存性の解決をしています --> トランザクションの確認を実行しています。 ---> パッケージ glibc.x86_64 0:2.17-260.el7_6.4 を 更新 --> 依存性の処理をしています: glibc = 2.17-260.el7_6.4 のパッケージ: glibc-common-2.17-260.el7_6.4.x86_64 ---> パッケージ glibc.x86_64 0:2.17-260.el7_6.5 を アップデート --> トランザクションの確認を実行しています。 ---> パッケージ glibc.i686 0:2.17-260.el7_6.4 を インストール --> 依存性の処理をしています: libfreebl3.so(NSSRAWHASH_3.12.3) のパッケージ: glibc-2.17-260.el7_6.4.i686 --> 依存性の処理をしています: libfreebl3.so のパッケージ: glibc-2.17-260.el7_6.4.i686 ---> パッケージ glibc.x86_64 0:2.17-260.el7_6.4 を 更新 --> トランザクションの確認を実行しています。 ---> パッケージ nss-softokn-freebl.i686 0:3.36.0-5.el7_5 を インストール --> 依存性解決を終了しました。 エラー: Multilib version problems found. This often means that the root cause is something else and multilib version checking is just pointing out that there is a problem. Eg.: 1. You have an upgrade for glibc which is missing some dependency that another package requires. Yum is trying to solve this by installing an older version of glibc of the different architecture. If you exclude the bad architecture yum will tell you what the root cause is (which package requires what). You can try redoing the upgrade with --exclude glibc.otherarch ... this should give you an error message showing the root cause of the problem. 2. You have multiple architectures of glibc installed, but yum can only see an upgrade for one of those architectures. If you don't want/need both architectures anymore then you can remove the one with the missing update and everything will work. 3. You have duplicate versions of glibc installed already. You can use "yum check" to get yum show these errors. ...you can also use --setopt=protected_multilib=false to remove this checking, however this is almost never the correct thing to do as something else is very likely to go wrong (often causing much more problems). Protected multilib versions: glibc-2.17-260.el7_6.5.x86_64 != glibc-2.17-260.el7_6.4.i686
/var/log/yum.log を確認しても、更新がインストールされたログは記録されていない。
パッケージを確認してみると、
# rpm -qa | grep glibc-common
glibc-common-2.17-260.el7_6.4.x86_64
glibc-common-2.17-260.el7_6.5.x86_64
のように、glibc-common が2つ入った(?)状態になっている。
よりによって glibc とは・・・。
重複したパッケージの整理を試みる。
(package-cleanup コマンドは、yum-utils パッケージに入っている)
# package-cleanup --cleandupes 読み込んだプラグイン:fastestmirror Not removing glibc-common-2.17-260.el7_6.4.x86_64 because it is required by 1 installed package No duplicates to remove Warning: Some duplicates were not removed because they are required by installed packages. You can try --cleandupes with --removenewestdupes, or review them with --dupes and remove manually.
オプションが足りないらしいので、追加してもう一度。
新しいバージョンのほうだけ削除されそうに見えるので、y を押して続行。
# package-cleanup --cleandupes --removenewestdupes 読み込んだプラグイン:fastestmirror 読み込んだプラグイン:fastestmirror --> トランザクションの確認を実行しています。 ---> パッケージ glibc-common.x86_64 0:2.17-260.el7_6.5 を 削除 --> 依存性解決を終了しました。 依存性を解決しました ========================================================================================================= Package アーキテクチャー バージョン リポジトリー 容量 ========================================================================================================= 削除中: glibc-common x86_64 2.17-260.el7_6.5 installed 115 M トランザクションの要約 ========================================================================================================= 削除 1 パッケージ インストール容量: 115 M 上記の処理を行います。よろしいでしょうか? [y/N]y Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction 警告: RPMDB は yum 以外で変更されました。 削除中 : glibc-common-2.17-260.el7_6.5.x86_64 1/1 検証中 : glibc-common-2.17-260.el7_6.5.x86_64 1/1 削除しました: glibc-common.x86_64 0:2.17-260.el7_6.5 完了しました!
パッケージの確認
# rpm -qa | grep glibc-common
glibc-common-2.17-260.el7_6.4.x86_64
1つになっていて良さげ。
yum update で再び更新すると問題なくアップデートされた。
yum.log を見てみると、
# tail /var/log/yum.log ・・・ 5月 11 08:58:42 Erased: glibc-common-2.17-260.el7_6.5.x86_64 May 11 08:59:52 Updated: glibc-common-2.17-260.el7_6.5.x86_64 May 11 08:59:54 Updated: glibc-2.17-260.el7_6.5.x86_64
という感じで大丈夫そうに見える。