yum update でつまづいた
同じことでまたつまずきそうなのでメモ。
yum update を実行したら、次のような感じでエラーが出た。
エラー: パッケージ: abrt-addon-python-2.1.11-52.el7.centos.x86_64 (@base)
要求: abrt = 2.1.11-52.el7.centos
削除中: abrt-2.1.11-52.el7.centos.x86_64 (@base)
abrt = 2.1.11-52.el7.centos
次のものにより更新された: : abrt-2.1.11-55.el7.centos.x86_64 (base)
abrt = 2.1.11-55.el7.centos
...
(中略)
...
エラー: パッケージ: abrt-tui-2.1.11-52.el7.centos.x86_64 (@base)
要求: abrt = 2.1.11-52.el7.centos
削除中: abrt-2.1.11-52.el7.centos.x86_64 (@base)
abrt = 2.1.11-52.el7.centos
次のものにより更新された: : abrt-2.1.11-55.el7.centos.x86_64 (base)
abrt = 2.1.11-55.el7.centos
問題を回避するために --skip-broken を用いることができます
なので、エラーメッセージに従って次のように実行してみた。
sudo yum --skip-broken update
今度は次のようなエラーが出た。
エラー: 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 WALinuxAgent which is missing some
dependency that another package requires. Yum is trying to
solve this by installing an older version of WALinuxAgent 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 WALinuxAgent.otherarch ... this should give you an error
message showing the root cause of the problem.
2. You have multiple architectures of WALinuxAgent 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 WALinuxAgent 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: WALinuxAgent-2.2.42-1.el7.noarch != WALinuxAgent-2.2.38-1.el7.noarch
エラーメッセージ中の「Protected multilib versions: 」でググったら、次の記事の引用に記載のシェルコマンド実行で重複するパッケージを削除することで解決につながる場合がある、ということだったのでやってみた。
[CentOS] yumのinstall/updateでトラブル時に便利なコマンド集 | 迷走男子!!
http://tazakazushi.net/yum_trouble_command.html
yum clean all package-cleanup --cleandupes yum update
結果、一部のパッケージはクリーンアップできなかったが、yumコマンドに--skip-broken を付加すれば重複のエラー無くパッケージをインストールできる旨確認できた。
次は--skip-broken でスキップしたパッケージをどうするかだなぁ、、、