CentOS 5.10にアップデートとyumのエラー対応

投稿日:

CentOS 5.10 がリリースされたみたいですね。

CentOS 5.10 Release Notes

って言っても全く気が付いて無かったんですけどw

5.9 にアップデートする時に CR repository を有効にしていたので数日前にまとまったアップデートは来てました。

CentOS 5.9にアップデートとCR repositoryの有効化

なので、別途アップデートするのは下記のパッケージだけ。

  • centos-release
  • centos-release-notes
  • httpd
  • httpd-manual
  • mod_ssl
  • tzdata

っと思ったのですが、なんか変なエラーが出て躓いたので備忘録的な意味もかねて書いておこうかと思います。

その前に、一応一般的な手順ですけど、毎度おなじみリリースノートには何も書いてないけどメーリングリストの方には一応手順が書いてあります。

Upgrading from CentOS-5.9 ( or any older CentOS-5 release ):

If you are already running CentOS-5.9 or an older CentOS-5 release, all
you need to do is update your machine via yum by running :

'yum update'

Running 'yum list updates' before doing the update is recommended, so
you can get a list of packages that are going to be updated. To check
you are indeed on CentOS-5.10, run : 'rpm -q centos-release' and that
should return: 'centos-release-5-10.el5.centos.1'

If you are running CentOS-5.9 and have the CR repo enabled, a simple
'yum update' will still move your machine to 5.10. But since the CR repo
already contained all the 5.10 updates, there will only be a handful of
rpms that need to be installed for the 5.9 to 5.10 upgrade. If you are
not running the CR repo, we highly encourage everyone to install and run
this repository on their machines. More details on the CR repo can be
found online at http://wiki.centos.org/AdditionalResources/Repositories/CR

で、今回起こったエラーと言うのは下記の様なもの。

Error Downloading Packages:
1:mod_ssl-2.2.3-83.el5.centos.x86_64: failure: RPMS/mod_ssl-2.2.3-83.el5.centos.x86_64.rpm from cr: [Errno 256] No more mirrors to try.
httpd-manual-2.2.3-83.el5.centos.x86_64: failure: RPMS/httpd-manual-2.2.3-83.el5.centos.x86_64.rpm from cr: [Errno 256] No more mirrors to try.
httpd-2.2.3-83.el5.centos.x86_64: failure: RPMS/httpd-2.2.3-83.el5.centos.x86_64.rpm from cr: [Errno 256] No more mirrors to try.
tzdata-2013g-1.el5.x86_64: failure: RPMS/tzdata-2013g-1.el5.x86_64.rpm from cr: [Errno 256] No more mirrors to try.

ちなみに、全体は下記の様な感じ。

# yum update
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * extras: ftp.iij.ad.jp
 * rpmforge: ftp.kddilabs.jp
 * updates: ftp.iij.ad.jp
116 packages excluded due to repository priority protections
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package centos-release.x86_64 10:5-10.el5.centos set to be updated
---> Package centos-release-notes.x86_64 0:5.10-0 set to be updated
---> Package httpd.x86_64 0:2.2.3-83.el5.centos set to be updated
---> Package httpd-manual.x86_64 0:2.2.3-83.el5.centos set to be updated
---> Package mod_ssl.x86_64 1:2.2.3-83.el5.centos set to be updated
---> Package tzdata.x86_64 0:2013g-1.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================
 Package                Arch     Version                  Repository    Size
=============================================================================
Updating:
 centos-release         x86_64   10:5-10.el5.centos       base          21 k
 centos-release-notes   x86_64   5.10-0                   base          40 k
 httpd                  x86_64   2.2.3-83.el5.centos      cr           1.3 M
 httpd-manual           x86_64   2.2.3-83.el5.centos      cr           819 k
 mod_ssl                x86_64   1:2.2.3-83.el5.centos    cr            98 k
 tzdata                 x86_64   2013g-1.el5              cr           797 k

Transaction Summary
=============================================================================
Install       0 Package(s)
Upgrade       6 Package(s)

Total size: 3.0 M
Total download size: 2.9 M
Is this ok [y/N]: y
Downloading Packages:
http://mirror.centos.org/centos/5/cr/x86_64/RPMS/mod_ssl-2.2.3-83.el5.centos.x86_64.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirror.centos.org/centos/5/cr/x86_64/RPMS/tzdata-2013g-1.el5.x86_64.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirror.centos.org/centos/5/cr/x86_64/RPMS/httpd-manual-2.2.3-83.el5.centos.x86_64.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
http://mirror.centos.org/centos/5/cr/x86_64/RPMS/httpd-2.2.3-83.el5.centos.x86_64.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.


Error Downloading Packages:
  1:mod_ssl-2.2.3-83.el5.centos.x86_64: failure: RPMS/mod_ssl-2.2.3-83.el5.centos.x86_64.rpm from cr: [Errno 256] No more mirrors to try.
  httpd-manual-2.2.3-83.el5.centos.x86_64: failure: RPMS/httpd-manual-2.2.3-83.el5.centos.x86_64.rpm from cr: [Errno 256] No more mirrors to try.
  httpd-2.2.3-83.el5.centos.x86_64: failure: RPMS/httpd-2.2.3-83.el5.centos.x86_64.rpm from cr: [Errno 256] No more mirrors to try.
  tzdata-2013g-1.el5.x86_64: failure: RPMS/tzdata-2013g-1.el5.x86_64.rpm from cr: [Errno 256] No more mirrors to try.

同じ様な現象は結構起こるみたいで、色々と書いてるサイトがあったのですが、yum のメタデータが変になってるのが原因みたい。

って事で、リセット。

# yum clean all

これで上手くアップデートできました。

============================================================================
 Package                Arch     Version                 Repository    Size
============================================================================
Updating:
 centos-release         x86_64   10:5-10.el5.centos      base          21 k
 centos-release-notes   x86_64   5.10-0                  base          40 k
 httpd                  x86_64   2.2.3-83.el5.centos     updates      1.3 M
 httpd-manual           x86_64   2.2.3-83.el5.centos     updates      819 k
 mod_ssl                x86_64   1:2.2.3-83.el5.centos   updates       98 k
 tzdata                 x86_64   2013g-1.el5             updates      797 k

Transaction Summary
============================================================================
Install       0 Package(s)
Upgrade       6 Package(s)

上手く行った方を見るとリポジトリが変わってるので、なんか変なキャッシュが残ってたんでしょうね。

# rpm -q centos-release
centos-release-5-10.el5.centos

っと言う事で終了。

まぁ、そろそろ 6系にしないとですが・・・

更新日: