CentOS7.3yum安装MariaDB报错[Errno 256]

Posted Tim

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS7.3yum安装MariaDB报错[Errno 256]相关的知识,希望对你有一定的参考价值。

在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出问题。然后修改为如下

[[email protected] yum.repos.d]# cat /etc/resolv.conf 
# Generated by NetworkManager
nameserver 223.5.5.5
nameserver 8.8.8.8

清理缓存,重新生成缓存,已正常,问题已经解决

[[email protected] yum.repos.d]# yum clean all
已加载插件:fastestmirror, langpacks
正在清理软件源: base extras mariadb updates
Cleaning up everything
[[email protected] 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]的主要内容,如果未能解决你的问题,请参考以下文章

安装mariadb报错: Job for mariadb.service failed because the control process exited with error code. See

Mariadb初始登陆报错 ERROR 1045 (28000) 的解决办法

为啥在虚拟机安装mysql命令报错yum install -y mariadb mariadb-server python2-PyMySQL?

centos 7.4 MariaDB python3.6 安装mysqlclient 报错 ld: cannot find -lmariadb 怎么修复?

centos7下启动不了mysql或者mariadb报错

Centos7安装 mariadb启动错误解决