CentOS7.3yum安裝MariaDB報錯[Errno 256]
阿新 • • 發佈:2019-01-11
min other 數據 generate mir generated rim true 配置
在yum安裝MariaDB時出現下面這個錯誤提示,然後著手排查,先檢查了/etc/yum.repo.d/下的配置文件,沒有錯誤。
failure: repodata/repomd.xml from mariadb: [Errno 256] No more mirrors to try. http://yum.mariadb.org/10.3/centos7-amd64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: yum.mariadb.org; 未知的錯誤"
我這個是雲主機,剛想安裝LNMP環境。我清理了yum緩存,重新生成緩存,結果也還沒解決,還是一樣顯示上面錯誤。
然後,我又重新看了錯誤提示信息,看到下面字樣,我就感覺是DNS解析問題了。
Trying other mirror.
查看 /etc/resolv.conf,顯示為空,暈了,明明之前配置好了的,難怪yum出問題。然後修改為如下
[root@SERVER1 yum.repos.d]# cat /etc/resolv.conf # Generated by NetworkManager nameserver 223.5.5.5 nameserver 8.8.8.8
清理緩存,重新生成緩存,已正常,問題已經解決
[root@SERVER1 yum.repos.d]# yum clean all 已加載插件:fastestmirror, langpacks 正在清理軟件源: base extras mariadb updates Cleaning up everything [root@SERVER1 yum.repos.d]# yum makecache 已加載插件:fastestmirror, langpacks base | 3.6 kB 00:00:00 extras | 3.4 kB 00:00:00 mariadb | 2.9 kB 00:00:00 updates | 3.4 kB 00:00:00 (1/15): base/7/x86_64/group_gz | 166 kB 00:00:00 (2/15): base/7/x86_64/primary_db | 5.9 MB 00:00:00 (3/15): base/7/x86_64/filelists_db | 6.9 MB 00:00:00 (4/15): extras/7/x86_64/prestodelta | 33 kB 00:00:00 (5/15): extras/7/x86_64/primary_db | 125 kB 00:00:00 (6/15): extras/7/x86_64/other_db | 83 kB 00:00:01 (7/15): mariadb/primary_db | 50 kB 00:00:01 (8/15): updates/7/x86_64/filelists_db | 637 kB 00:00:00 (9/15): updates/7/x86_64/prestodelta | 57 kB 00:00:00 (10/15): updates/7/x86_64/primary_db | 1.0 MB 00:00:00 (11/15): updates/7/x86_64/other_db | 55 kB 00:00:00 (12/15): mariadb/other_db | 7.3 kB 00:00:01 (13/15): extras/7/x86_64/filelists_db | 444 kB 00:00:07 (14/15): mariadb/filelists_db | 206 kB 00:00:19 (15/15): base/7/x86_64/other_db | 2.5 MB 00:00:21 Determining fastest mirrors * base: 100.125.0.40 * extras: 100.125.0.40 * updates: 100.125.0.40 元數據緩存已建立
CentOS7.3yum安裝MariaDB報錯[Errno 256]