ログってなんぼ

日々のメモです

CentOS4.6.i386にyumを入れる

yum-2.4.2-0.4.el4.rf.noarch.rpm 16-Jun-2006 13:48 380K RHEL4 and CentOS-4 noarch 引用元:Index of /yum はてなブックマーク - yum-2.4.2-0.4.el4.rf.noarch.rpm 16-Jun-2006 13:48  380K  RHEL4 and CentOS-4 noarch

CentOS4用のyumはここにあります

http://pkgs.repoforge.org/yum/yum-2.4.2-0.4.el4.rf.noarch.rpm

インストールしようとすると

wget http://pkgs.repoforge.org/yum/yum-2.4.2-0.4.el4.rf.noarch.rpm

rpm -ivh yum-2.4.2-0.4.el4.rf.noarch.rpm

 libxml2-python is needed by yum-2.4.2-0.4.el4.rf.noarch
 python-elementtree is needed by yum-2.4.2-0.4.el4.rf.noarch
 python-sqlite is needed by yum-2.4.2-0.4.el4.rf.noarch
 rpm-python is needed by yum-2.4.2-0.4.el4.rf.noarch
 urlgrabber is needed by yum-2.4.2-0.4.el4.rf.noarch

環境によっても違うと思いますが依存関係のエラーが色々と出て来たら

Index of /4.6/os/i386/CentOS/RPMS はてなブックマーク - Index of /4.6/os/i386/CentOS/RPMS

この辺りからコツコツ落としてインストールします・・・

準備ができたら再度インストール

rpm -ivh yum-2.4.2-0.4.el4.rf.noarch.rpm

インストールできたら、試しにyum updateしてみますか

yum update

Setting up Update Process Setting up repositories not using ftp, http[s], or file for repos, skipping - 4 is not a valid release or hasnt been released yet Cannot find a valid baseurl for repo: update Error: Cannot find a valid baseurl for repo: update

そんなリポジトリみつかんねーよ的なエラー。

vi /etc/yum.repos.d/CentOS-Base.repo

[base] name=CentOS-$releasever - Base mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os

baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/

gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 priority=1 protect=1 . . .

2013年現在、CentOS4用のRPMは vault.centos.org に保管されているようなので、ちゃんと動くようにbaseurlを直接指定してしまいます。

mirrorlist~をコメントアウトして、baseurl=http://vault.centos.org/うんたらかんたらの部分を追記。

無理やりくさいが仕方ないです。

CentOS-Base.repo

#

This file uses a new mirrorlist system developed by Lance Davis for CentOS.

The mirror system uses the connecting IP address of the client and the

update status of each mirror to pick mirrors that are updated to and

geographically close to the client. You should use this for CentOS updates

unless you are manually picking other mirrors.

#

If the mirrorlist= does not work for you, as a fall back you can try the

remarked out baseurl= line instead.

# #

[base] name=CentOS-$releasever - Base

mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os

baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/

baseurl=http://vault.centos.org/4.6/os/$basearch/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 priority=1 protect=1

released updates

[update] name=CentOS-$releasever - Updates

mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates

baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/

baseurl=http://vault.centos.org/4.6/updates/$basearch gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 priority=1 protect=1

packages used/produced in the build but not released

[addons] name=CentOS-$releasever - Addons

mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons

baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/

baseurl=http://vault.centos.org/4.6/addons/$basearch/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 priority=1 protect=1

additional packages that may be useful

[extras] name=CentOS-$releasever - Extras

mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras

baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/

baseurl=http://vault.centos.org/4.6/extras/$basearch/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 priority=1 protect=1

additional packages that extend functionality of existing packages

[centosplus] name=CentOS-$releasever - Plus

mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus

baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/

baseurl=http://vault.centos.org/4.6/centosplus/$basearch/ gpgcheck=1 enabled=0 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 priority=2 protect=1

contrib - packages by Centos Users

[contrib] name=CentOS-$releasever - Contrib

mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib

baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/

baseurl=http://vault.centos.org/4.6/contrib/$basearch/ gpgcheck=1 enabled=0 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 priority=2 protect=1

気を取り直して再度チャレンジ

yum update

Setting up Update Process Setting up repositories Reading repository metadata in from local files Resolving Dependencies --> Populating transaction set with selected packages. Please wait. ---> Package python-sqlite.i386 0:1.1.7-1.2.1 set to be updated ---> Package tzdata.noarch 0:2008b-3.el4 set to be updated ---> Package selinux-policy-targeted.noarch 0:1.17.30-2.150.el4 set to be updated ---> Package krb5-devel.i386 0:1.3.4-54.el4_6.1 set to be updated ---> Package kernel-devel.i686 0:2.6.9-67.0.22.EL set to be installed ---> Package kernel.i686 0:2.6.9-67.0.22.EL set to be installed ---> Package sqlite.i386 0:3.3.6-2 set to be updated ---> Package kernel-smp.i686 0:2.6.9-67.0.22.EL set to be installed ---> Package kernel-smp-devel.i686 0:2.6.9-67.0.22.EL set to be updated ---> Package libxslt.i386 0:1.1.11-1.el4_6.1 set to be updated ---> Package procps.i386 0:3.2.3-8.9.el4_6.1 set to be updated ---> Package gdb.i386 0:6.3.0.0-1.153.el4_6.2 set to be updated ---> Package libxml2-python.i386 0:2.6.16-10.1 set to be updated ---> Package autofs.i386 1:4.1.3-231.el4_6.2 set to be updated ---> Package yum.noarch 0:2.4.3-4.el4.centos set to be updated ---> Package krb5-libs.i386 0:1.3.4-54.el4_6.1 set to be updated ---> Package openldap.i386 0:2.2.13-8.el4_6.5 set to be updated ---> Package kernel-hugemem-devel.i686 0:2.6.9-67.0.22.EL set to be updated ---> Package perl.i386 3:5.8.5-36.el4_6.3 set to be updated --> Running transaction check --> Processing Dependency: yum-metadata-parser for package: yum --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Package yum-metadata-parser.i386 0:1.0-8.el4.centos set to be updated --> Running transaction check

Dependencies Resolved


Package Arch Version Repository Size

Installing: kernel i686 2.6.9-67.0.22.EL update 12 M kernel-devel i686 2.6.9-67.0.22.EL update 3.9 M kernel-smp i686 2.6.9-67.0.22.EL update 11 M Updating: autofs i386 1:4.1.3-231.el4_6.2 update 264 k gdb i386 6.3.0.0-1.153.el4_6.2 update 2.6 M kernel-hugemem-devel i686 2.6.9-67.0.22.EL update 3.9 M kernel-smp-devel i686 2.6.9-67.0.22.EL update 3.9 M krb5-devel i386 1.3.4-54.el4_6.1 update 824 k krb5-libs i386 1.3.4-54.el4_6.1 update 484 k libxml2-python i386 2.6.16-10.1 update 440 k libxslt i386 1.1.11-1.el4_6.1 update 435 k openldap i386 2.2.13-8.el4_6.5 update 237 k perl i386 3:5.8.5-36.el4_6.3 update 12 M procps i386 3.2.3-8.9.el4_6.1 update 189 k python-sqlite i386 1.1.7-1.2.1 base 37 k selinux-policy-targeted noarch 1.17.30-2.150.el4 update 125 k sqlite i386 3.3.6-2 base 193 k tzdata noarch 2008b-3.el4 update 451 k yum noarch 2.4.3-4.el4.centos base 386 k Installing for dependencies: yum-metadata-parser i386 1.0-8.el4.centos base 23 k

Transaction Summary

Install 4 Package(s) Update 16 Package(s) Remove 0 Package(s) Total download size: 53 M Is this ok [y/N]:

うまくいきました。