パッケージ管理 yum rpm

自動アップデート エラー@CentOS6.5
Posted on 2013年12月6日 by Qsaku

貧乏暇なし状態でしばらくサーバーをかっまって
(本当は構われている・・・)やることができませんでしたが
大事なメールが届かないというユーザーの申し出でメールログをチェック。
送った方のメールには何のメーラーを使用しているかという情報を
隠ぺいするコマンドが設定してあり、スパム判定の加点が極端に
大きかったため、留置されてましたので、とりあえず釈放しておきました。(笑
たぶんご本人は意識していないのでしょうがそんなこともあります。
お役所のパソコンからのメールということで、信用してそのアドレスは
ホワイトリストに載せておきました。

ついでにメール以外のログをチェックしていると、どうやら自動アップデートが
エラーをはいている模様なので手動でやってみると・・・

# yum update

yum update
Loaded plugins: downloadonly, fastestmirror, priorities, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* rpmforge: mirrors.neusoft.edu.cn
88 packages excluded due to repository priority protections
Setting up Update Process
Resolving Dependencies
–> Running transaction check
—> Package ModemManager.x86_64 0:0.4.0-3.git20100628.el6 will be updated
—> Package ModemManager.x86_64 0:0.4.0-5.git20100628.el6 will be an update

****** 省略 (しばらく滞っていたので大量にあります)*********

–> Processing Dependency: /etc/clamd.d for package: amavisd-new-2.8.0-4.el6.noarch
–> Finished Dependency Resolution
– > Running transaction check

*******通常はここからダウンロード・アップデート/インストールが
始まるのですが・・・   *****************************

—> Package amavisd-new.noarch 0:2.8.0-4.el6 will be an update
–> Processing Dependency: /etc/clamd.d for package: amavisd-new-2.8.0-4.el6.noarch
—> Package kernel.x86_64 0:2.6.32-358.6.2.el6 will be erased
—> Package kernel-devel.x86_64 0:2.6.32-358.6.2.el6 will be erased
–> Processing Dependency: /etc/clamd.d for package: amavisd-new-2.8.0-4.el6.noarch
–> Processing Dependency: /etc/clamd.d for package: amavisd-new-2.8.0-4.el6.noarch
–> Finished Dependency Resolution
Error: Package: amavisd-new-2.8.0-4.el6.noarch (epel)
Requires: /etc/clamd.d
Available: clamd-0.98-2.el6.x86_64 (epel)
Not found
Installed: clamd-0.98-2.el6.rf.x86_64 (@rpmforge)
Not found
Available: clamd-0.96.4-1.el6.rf.x86_64 (rpmforge)
Not found
Available: clamd-0.96.5-1.el6.rf.x86_64 (rpmforge)
Not found
Available: clamd-0.97-1.el6.rf.x86_64 (rpmforge)
Not found
Available: clamd-0.97.1-1.el6.rf.x86_64 (rpmforge)
Not found
Available: clamd-0.97.2-1.el6.rf.x86_64 (rpmforge)
Not found
Available: clamd-0.97.3-1.el6.rf.x86_64 (rpmforge)
Not found
Available: clamd-0.97.4-1.el6.rf.x86_64 (rpmforge)
Not found
Available: clamd-0.97.5-1.el6.rf.x86_64 (rpmforge)
Not found
Available: clamd-0.97.5-2.el6.rf.x86_64 (rpmforge)
Not found
Available: clamd-0.97.6-1.el6.rf.x86_64 (rpmforge)
Not found
Available: clamd-0.97.7-1.el6.rf.x86_64 (rpmforge)
Not found
Available: clamd-0.98-1.el6.rf.x86_64 (rpmforge)
Not found

フムフム、こいつは登録したサードパティのリポジトリepelとrpmforgeの
パッケージが競合していて、epelに置いてあるamavisd-new-2.8を、
まだ置いてないrpmforgeがそんなのねーぞと騒いでいる・・・w
(clamdはamavisd-newと親密・・密接な関係の意・・なのです)

epelは1つだけ、rpmforgeは数個のパッケージが欲しいために登録しておいた
リポジトリで、一応同時に yum-priorities をインストールしておいたのですが、
ディフォルトではプライオリティがサードパーティとなり、標準リポジトリの
パッケージで上書きされないようにするだけで、サードパーティどうしでは
priority=1 priority=2 priority=3 のごとく設定してやるか、使わないほうに
excludeの設定しなくてはいけないのを失念していたのが原因でした。

epelでは必要なのはお試しした1個だけのパッケージだったので、今回は単に
/etc/yum.repos.d/epel.repoを編集してenabled=0にしておきました。

yum updateコマンドは一つでも不具合があると、全部が止まってしまいます。
自動アップデートにしてあるからと言って、安心できないということですね。
で、これを教訓に自動アップデートのパッケージをアンインストールしてしまい
yum update –skip-broken というオプション付きコマンドをcron.dailyに設定することにします。
読んで字のごとく、ダメなやつはぶっとばしてできる奴だけアップデートします。
(ただしエラーを吐いていることに気づかないかも。。。)

参考記事(CentOS7)

     → こちら ←

HOME