安装epel源 失败:未知的名称或服务。 wget: 无法解析主机地址 “mirrors.aliyun.com”
生活随笔
收集整理的這篇文章主要介紹了
安装epel源 失败:未知的名称或服务。 wget: 无法解析主机地址 “mirrors.aliyun.com”
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
安裝epel源 失敗:未知的名稱或服務(wù)。 wget: 無法解析主機(jī)地址 “mirrors.aliyun.com”
今天yum search mysql發(fā)現(xiàn)沒有想要的mysql,于是考慮企業(yè)中常用的一個(gè)yum源epel.
可惜安裝epel失敗了。
給我的報(bào)錯(cuò)提示是:
后來解決了:
(1)在我真機(jī)的系統(tǒng)偏好設(shè)置中,改了DNS:
(2)修改CentOS中的配置文件
[root@localhost ~]# vi /etc/resolv.conf然后將內(nèi)容改成下面這樣:
# Generated by NetworkManager nameserver 114.114.114.114 nameserver 119.29.29.29最后:再執(zhí)行阿里云官網(wǎng)上安裝epel鏡像的命令:
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo就成功了:
最后,yum makecache,建立緩存:
[root@localhost ~]# yum makecache 已加載插件:fastestmirror, langpacks Loading mirror speeds from cached hostfile* base: mirrors.aliyun.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com base | 3.6 kB 00:00 epel | 4.7 kB 00:00 extras | 2.9 kB 00:00 updates | 2.9 kB 00:00 (1/5): epel/x86_64/updateinfo | 1.0 MB 00:02 (2/5): epel/x86_64/prestodelta | 3.0 kB 00:00 (3/5): epel/x86_64/primary_db | 7.0 MB 00:13 (4/5): epel/x86_64/other_db | 3.4 MB 00:06 (5/5): epel/x86_64/filelists_db | 12 MB 00:23 元數(shù)據(jù)緩存已建立就安裝成功了。
總結(jié)
以上是生活随笔為你收集整理的安装epel源 失败:未知的名称或服务。 wget: 无法解析主机地址 “mirrors.aliyun.com”的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 李洋疯狂C语言之关于自增自减遇到的一些问
- 下一篇: 排序_3