yumがupdateできない件(CentOS6)

サポートが終わってしまったCentOS6...
yum -y update を実行すると、下記のエラーが出ます。(2021/01/20現在)

--------------------------------------------
yum -y update
読み込んだプラグイン:fastestmirror, priorities, security
更新処理の設定をしています
Repository dag is listed more than once in the configuration
Determining fastest mirrors
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
エラー: Cannot find a valid baseurl for repo: base
--------------------------------------------
当然アップデートできない状態ですので、ここではアプデができなくなった際の回避策をお伝えします。

まずはデフォのレポジトリを修正。
修正ファイルは3点。

cd /etc/yum.repos.d

vim CentOS-Base.repo
修正個所↓
------------------
[base]
baseurl=http://vault.centos.org/centos/$releasever/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra

[updates]
baseurl=http://vault.centos.org/centos/$releasever/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra

[extras]
baseurl=http://vault.centos.org/centos/$releasever/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
------------------

vim CentOS-SCLo-scl-rh.repo
修正個所↓
------------------
[centos-sclo-rh]
baseurl=http://vault.centos.org/centos/6/sclo/$basearch/rh/
#mirrorlist=http://mirrorlist.centos.org?arch=$basearch&release=6&repo=sclo-rh
------------------

vim CentOS-SCLo-scl.repo
修正個所↓
------------------
[centos-sclo-sclo]
baseurl=http://vault.centos.org/centos/6/sclo/$basearch/sclo/
#mirrorlist=http://mirrorlist.centos.org?arch=$basearch&release=6&repo=sclo-sclo
------------------

これでアプデ可能になりますが、いつまで使えるかは何とも言えませんので、できることならOS自体をCentOS7以降に変更するべきですね!

#CentOS6
#yum update
#YumRepo Error
#CentOS7

 COMMENT

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

関連記事

NO IMAGE

mysqlで現在の接続数を確認する

NO IMAGE

ddo IP更新ツール

NO IMAGE

ユーザーnginxやapacheがsudoを使えるようにする

NO IMAGE

よく使うnetstat

NO IMAGE

apacheアパッチが異常終了し、httpdを終了できない対処CentOS 6o...

NO IMAGE

apacheやnginxの同時接続数をリアルタイムでモニタリング