5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

CentOS6系のyumが404を返す場合(2020/3版)

Last updated at Posted at 2020-03-30

注意

  • 2023/10/05現在、以下のURLは使えなくなっています。詳しくはこちら

  • 2023/10現在、こちらの方の記事が有効であることを確認しました

    • CentOS6系の場合、同記事URL内の 5.10 を任意の値(例: 6.10)に書き換えれば機能します

はじめに

 本来、今更CentOS6系を使うべきではないのでしょうが、悲しいことに今回触ることになってしまいました。そして、早速yumが動かない…。同様のトラブルは多いようで、Web上にも以下のような情報が散見されます。

 ですが、上記サイトの情報は既に古いようで当方の環境では動作しなかったので、2020年3月現在の情報を残しておきます。

対策

 yum用の情報が格納されたファイル /etc/yum.repos.d/CentOS-Base.repo を、以下のように書き換えます。

/etc/yum.repos.d/CentOS-Base.repo
# CentOS-Base.repo
#
# 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-6.10 - Base
#mirrorlist=http://mirrorlist.centos.org/?release=6.10&arch=$basearch&repo=os&infra=$infra
baseurl=http://mirror.centos.org/centos/6/os/x86_64/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#released updates
[updates]
name=CentOS-6.10 - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=6.10&arch=$basearch&repo=updates&infra=$infra
baseurl=http://mirror.centos.org/centos/6/updates/x86_64/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful
[extras]
name=CentOS-6.10 - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=6.10&arch=$basearch&repo=extras&infra=$infra
baseurl=http://mirror.centos.org/centos/6/extras/x86_64/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6.10 - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=6.10&arch=$basearch&repo=centosplus&infra=$infra
baseurl=http://mirror.centos.org/centos/6/centosplus/x86_64/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users
[contrib]
name=CentOS-6.10 - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=6.10&arch=$basearch&repo=contrib&infra=$infra
baseurl=http://mirror.centos.org/centos/6/contrib/x86_64/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

 上記内容はCentOS 6.10のものですが、リポジトリ自体は6系共通(?)のようです。

5
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?