yum update時のエラーの解決 ERROR with transaction check vs depsolve:
yum updateの途中でコンソールが応答しなくなり、それ以降のyum updateがエラーで失敗するようになりました。
エラー内容
エラー内容
There are unfinished transactions remaining. You might consider running yum-complete-transaction, or "yum-complete-transaction --cleanup-only" and "yum history redo last", first to finish them. If those don't work you'll have to try removing/installing packages by hand (maybe package-cleanup can help). The program yum-complete-transaction is found in the yum-utils package.
環境
OSはAmazon Linux 2
# cat /etc/os-release NAME="Amazon Linux" VERSION="2" ID="amzn" ID_LIKE="centos rhel fedora" VERSION_ID="2" PRETTY_NAME="Amazon Linux 2" ANSI_COLOR="0;33" CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2" HOME_URL="https://amazonlinux.com/"
対応
The program yum-complete-transaction is found in the yum-utils package.と表示されているので、yum-utilsをインストールしました。
yum install yum-utils
続いて、以下のメッセージの通り、コマンドを実行しました。
There are unfinished transactions remaining. You might consider running yum-complete-transaction, or "yum-complete-transaction --cleanup-only" and "yum history redo last", first to finish them. If those don't work you'll have to try removing/installing packages by hand (maybe package-cleanup can help).コマンド
# yum-complete-transaction --cleanup-only Loaded plugins: dkms-build-requires, nvidia, priorities, update-motd, upgrade-helper 7 packages excluded due to repository priority protections Cleaning up unfinished transaction journals
これでyum updateが成功するようになりました。やはりエラーメッセージは読まないとだめですね。