yum updateでgd-lastのアップデートに失敗したときの対策方法

yum updateでgd-lastのアップデートに失敗したときの対策方法 サーバー

yum updateでサーバーのパッケージのアップデートを行おうとしたら、『エラー: パッケージ: gd-last-2.3.0-1.el7.remi.x86_64 (remi-safe) 要求: libraqm.so.0()(64bit)」』と表示されてyum updateが失敗する。

yum updateの失敗画面

早速原因を調査して対策します。

※動作確認環境
CentOS Linux 7.8

症状

以下がyum update失敗時のSSHのログです。

# yum update
読み込んだプラグイン:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * centos-sclo-rh: ftp.iij.ad.jp
 * centos-sclo-sclo: ftp.iij.ad.jp
 * extras: ftp.iij.ad.jp
 * remi-safe: ftp.riken.jp
 * updates: ftp.iij.ad.jp
依存性の解決をしています
--> トランザクションの確認を実行しています。
---> パッケージ gd-last.x86_64 0:2.2.5-10.el7.remi を 更新
---> パッケージ gd-last.x86_64 0:2.3.0-1.el7.remi を アップデート
--> 依存性の処理をしています: libraqm.so.0()(64bit) のパッケージ: gd-last-2.3.0-1.el7.remi.x86_64
--> 依存性解決を終了しました。
エラー: パッケージ: gd-last-2.3.0-1.el7.remi.x86_64 (remi-safe)
             要求: libraqm.so.0()(64bit)
 問題を回避するために --skip-broken を用いることができます。
 これらを試行できます: rpm -Va --nofiles --nodigest

パッケージ「gd-last」の依存性の処理中に、パッケージ「libraqm」が必要になったが「libraqm」がインストールできなくてエラーになっています。

調査

yum listを実行し、不足しているパッケージ「libraqm」が、どのリポジトリで入手可能か調べます。

# yum list --enablerepo=remi,epel libraqm
パッケージを検索する際は、yumのオプションにて
--enablerepo=remi,epelを指定し、EPELおよびRemiの双方のリポジトリを許可してから検索すればほぼ見つかります。
以下が検索結果です。
# yum list --enablerepo=remi,epel libraqm
読み込んだプラグイン:fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.tsukuba.wide.ad.jp
 * epel: mirrors.yun-idc.com
 * extras: ftp.tsukuba.wide.ad.jp
 * updates: ftp.tsukuba.wide.ad.jp
利用可能なパッケージ
libraqm.x86_64                              0.7.0-4.el7                              epel

EPELでlibraqmが見つかりました。

対策

yumの--enablerepo=epelオプションでEPELを許可して「libraqm」をインストールします。

# yum -y install --enablerepo=epel libraqm
読み込んだプラグイン:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * centos-sclo-rh: ftp.iij.ad.jp
 * centos-sclo-sclo: ftp.iij.ad.jp
 * epel: ftp.riken.jp
 * extras: ftp.iij.ad.jp
 * remi-safe: ftp.riken.jp
 * updates: ftp.iij.ad.jp
依存性の解決をしています
--> トランザクションの確認を実行しています。
---> パッケージ libraqm.x86_64 0:0.7.0-4.el7 を インストール
--> 依存性解決を終了しました。

依存性を解決しました

===================================================================================================
 Package                アーキテクチャー      バージョン                 リポジトリー         容量
===================================================================================================
インストール中:
 libraqm                x86_64                0.7.0-4.el7                epel                 15 k

トランザクションの要約
===================================================================================================
インストール  1 パッケージ

総ダウンロード容量: 15 k
インストール容量: 20 k
Downloading packages:
libraqm-0.7.0-4.el7.x86_64.rpm                                              |  15 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  インストール中          : libraqm-0.7.0-4.el7.x86_64                                         1/1 
  検証中                  : libraqm-0.7.0-4.el7.x86_64                                         1/1 

インストール:
  libraqm.x86_64 0:0.7.0-4.el7                                                                     

完了しました!

再度yum updateを実行

「gd-last」のアップデート時に必要だった「libraqm」のインストールが完了したので、再度yum updateを実行します。

# yum update
読み込んだプラグイン:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * centos-sclo-rh: ftp.iij.ad.jp
 * centos-sclo-sclo: ftp.iij.ad.jp
 * extras: ftp.iij.ad.jp
 * remi-safe: ftp.riken.jp
 * updates: ftp.iij.ad.jp
依存性の解決をしています
--> トランザクションの確認を実行しています。
---> パッケージ gd-last.x86_64 0:2.2.5-10.el7.remi を 更新
---> パッケージ gd-last.x86_64 0:2.3.0-1.el7.remi を アップデート
--> 依存性解決を終了しました。

依存性を解決しました

===================================================================================================
 Package             アーキテクチャー   バージョン                     リポジトリー           容量
===================================================================================================
更新します:
 gd-last             x86_64             2.3.0-1.el7.remi               remi-safe             135 k

トランザクションの要約
===================================================================================================
更新  1 パッケージ

総ダウンロード容量: 135 k
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
gd-last-2.3.0-1.el7.remi.x86_64.rpm                                         | 135 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  更新します              : gd-last-2.3.0-1.el7.remi.x86_64                                    1/2 
  整理中                  : gd-last-2.2.5-10.el7.remi.x86_64                                   2/2 
  検証中                  : gd-last-2.3.0-1.el7.remi.x86_64                                    1/2 
  検証中                  : gd-last-2.2.5-10.el7.remi.x86_64                                   2/2 

更新:
  gd-last.x86_64 0:2.3.0-1.el7.remi                                                                

完了しました!

今度はエラーで停止することもなく、正常にyum updateが終了しました。

以上で解決です。

タイトルとURLをコピーしました