28.yum install 出现 Couldn't resolve host

  1. 使用yum install 出现以下错误
http://hk.mirrors.thegigabit.com/centos/7.9.2009/os/x86_64/repodata/d6d94c7d406fe7ad4902a97104b39a0d8299451832a97f31d71653ba982c955b-filelists.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: hk.mirrors.thegigabit.com; 未知的错误"
http://centos.nethub.com.hk/7.9.2009/os/x86_64/repodata/d6d94c7d406fe7ad4902a97104b39a0d8299451832a97f31d71653ba982c955b-filelists.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: centos.nethub.com.hk; 未知的错误"
http://repo.virtualhosting.hk/centos/7.9.2009/os/x86_64/repodata/d6d94c7d406fe7ad4902a97104b39a0d8299451832a97f31d71653ba982c955b-filelists.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: repo.virtualhosting.hk; 未知的错误"
http://mirror.xtom.com.hk/centos/7.9.2009/os/x86_64/repodata/d6d94c7d406fe7ad4902a97104b39a0d8299451832a97f31d71653ba982c955b-filelists.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirror.xtom.com.hk; 未知的错误"
http://mirror-hk.koddos.net/centos/7.9.2009/os/x86_64/repodata/d6d94c7d406fe7ad4902a97104b39a0d8299451832a97f31d71653ba982c955b-filelists.sqlite.bz2: [Errno 14] curl#6 - "Could not resolve host: mirror-hk.koddos.net; 未知的错误"
  1. 修改 /etc/resolv.conf,添加以下内容
nameserver 8.8.8.8
posted @ 2022-03-31 11:05  呱呱二号  阅读(263)  评论(0编辑  收藏  举报