使っていなかったCentOS 6でyum upgradeした時のエラー
エラーその1
yum upgrade Loaded plugins: fastestmirror Determining fastest mirrors Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was 14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'" Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=extras error was 14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'" Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=updates error was 14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
DNSの設定をしていなかった(間違っていた)。
/etc/resolv.conf
で、ルーターのIPアドレスと、GoogleのDNS (8.8.4.4 or 8.8.8.8)を設定した。
エラーその2
yum upgrade Loaded plugins: fastestmirror Determining fastest mirrors * base: ftp.tsukuba.wide.ad.jp * extras: ftp.tsukuba.wide.ad.jp * updates: ftp.tsukuba.wide.ad.jp http://ftp.tsukuba.wide.ad.jp/Linux/centos/6.2/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404" Trying other mirror. http://mirror.fairway.ne.jp/centos/6.2/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404" Trying other mirror. http://www.ftp.ne.jp/Linux/packages/CentOS/6.2/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404" Trying other mirror. http://ftp.riken.jp/Linux/centos/6.2/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404" Trying other mirror. http://ftp.iij.ad.jp/pub/linux/centos/6.2/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404" Trying other mirror. http://ftp.nara.wide.ad.jp/pub/Linux/centos/6.2/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404" Trying other mirror.
ネットで検索すると、
/etc/yum.repos.d/
の配下にあるファイルを修正する方法があったけど、
正しいURLを探すのが面倒だったので、もうちょっと調べたら、別の方法があった。
yum clean metadata yum clean all
で直った。
ついでのメモ
EPELリポジトリを追加して、dockerをインストール。
yum install epel-release yum --enablerepo=epel install docker-io
dockerは入ったけど、CentOS6では動かないっぽい。
http://kubotti.hatenablog.com/entry/2015/11/26/120452