dnf update に失敗する場合の対応

dnf update -y

が以下のエラーで失敗する場合の対応

CentOS Stream 8 - AppStream
Errors during downloading metadata for repository 'appstream':
  - Curl error (6): Couldn't resolve host name for http://mirrorlist.centos.org/?release=8-stream&arch=x86_64&repo=AppStream&infra=stock [Could not resolve host: mirrorlist.centos.org]
cd /etc/yum.repos.d/
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

以上です!

引用元 : https://ja.unixlinux.online/xt/1007016469.html

No.2530
07/04 15:17

edit