Centos7使用yum命令报错:“Could not resolve host: mirrors.aliyun.com; 未知的错误“

[lj@localhost ~]$ sudo yum install -y libdvdcss gstreamer{
    
    ,1}-plugins-ugly gstreamer-plugins-bad-nonfree gstreamer1-plugins-bad-freeworld libde265 x265
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyun.com; 未知的错误"
正在尝试其它镜像。
http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; 未知的错误"
正在尝试其它镜像。
http://mirrors.aliyuncs.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyuncs.com; 未知的错误"
正在尝试其它镜像。
https://download.docker.com/linux/centos/7/x86_64/stable/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: download.docker.com; 未知的错误"
正在尝试其它镜像。
http://mirrors.aliyun.com/centos/7/extras/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyun.com; 未知的错误"
正在尝试其它镜像。
http://mirrors.cloud.aliyuncs.com/centos/7/extras/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; 未知的错误"
正在尝试其它镜像。
http://mirrors.aliyuncs.com/centos/7/extras/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyuncs.com; 未知的错误"
正在尝试其它镜像。
http://mirrors.aliyun.com/centos/7/updates/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyun.com; 未知的错误"
正在尝试其它镜像。
http://mirrors.cloud.aliyuncs.com/centos/7/updates/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; 未知的错误"
正在尝试其它镜像。
http://mirrors.aliyuncs.com/centos/7/updates/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.aliyuncs.com; 未知的错误"
正在尝试其它镜像。
没有可用软件包 libdvdcss。
没有可用软件包 gstreamer-plugins-ugly。
没有可用软件包 gstreamer1-plugins-ugly。
没有可用软件包 gstreamer-plugins-bad-nonfree。
没有可用软件包 gstreamer1-plugins-bad-freeworld。
没有可用软件包 libde265。
没有可用软件包 x265。
错误:无须任何处理

解决办法:
编辑/etc/resolv.conf文件

vi /etc/resolv.conf
nameserver 8.8.8.8
nameserver 114.114.114.114

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_40713201/article/details/125035205