CentOS:アクセスできないストレージを無効にする

CentOS:アクセスできないストレージを無効にする

アクセスできないストレージを無効にする方法は?

yum repolist使用時にエラーが発生しますyum list

# yum list | grep 404
http://download.opensuse.org/repositories/home%3A/SannisDev/
CentOS_CentOS-    5/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.

実際にはそのURLにアクセスできません。

# ping opensuse.org
PING opensuse.org (130.57.5.70) 56(84) bytes of data.
From 10.2.15.2 icmp_seq=1 Destination Host Unreachable

ただし、次のリポジトリが見つかりません/etc/yum.conf

# grep opensuse /etc/*

ベストアンサー1

このホストを検索するには、grepで-Rオプションを使用する必要があります。

grep -R opensuse  /etc/yum.repos.d/ | cut -d":" -f1

上記のコマンドは、正確に一致するファイルを印刷します。

次のコマンドを使用してリンクに動的にコメントを付けることができます。

grep -R opensuse  /etc/yum.repos.d/ | cut -d":" -f1 | xargs -n1 sed -i.bkp "/opensuse/ s/^/#/"

おすすめ記事