目次

40 CentOS6 yum使えない

CentOS6でサポート終了のためyumが利用できない。

エラー

# yum install tuned
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 282 k
http://mirror.centos.org/centos/6/os/x86_64/Packages/tuned-0.2.19-18.el6.noarch.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
http://mirror.centos.org/centos/6/os/x86_64/Packages/usermode-1.102-3.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.


Error Downloading Packages:
  usermode-1.102-3.el6.x86_64: failure: Packages/usermode-1.102-3.el6.x86_64.rpm from base: [Errno 256] No more mirrors to try.
  tuned-0.2.19-18.el6.noarch: failure: Packages/tuned-0.2.19-18.el6.noarch.rpm from base: [Errno 256] No more mirrors to try.

参考

対応

sed -i.bak -e 's/^mirrorlist/#mirrorlist/g' \
-e 's/mirror.centos.org/vault.centos.org/g' \
-e 's/^#baseurl/baseurl/g' /etc/yum.repos.d/CentOS-Base.repo