学习问题日记-1

学习Nginx时候,在Linux平台上安装Nginx时候遇到的问题报错。

已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误"

最终通过不屑努力找到了解决办法:
在Liunx终端依次输入:

cd /etc/yum.repos.d
cp CentOS-Base.repo CentOS-Base.repo.bak
sudo curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
sudo yum clean all
sudo yum makecache
posted @ 2025-09-22 20:32  chools  阅读(3)  评论(0)    收藏  举报