当前位置: > CentOS > CentOS故障 >

centos7.0使用yum安装mysql报错

时间:2016-01-02 22:00来源:linux.it.net.cn 作者:IT

使用centos7.0安装mysql报错如下:

100.JPG

原因是阿里云提供的一键安装包配置环境,会更新为阿里云的yum源,切换到CentOS的官方yum即可

编辑yum源文件/etc/yum.repos.d/epel.repo,将内容修改成下面的内容

[epel]

name=Extra Packages for Enterprise Linux 7 - $basearch

#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch

mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch

failovermethod=priority

enabled=1

gpgcheck=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 

[epel-debuginfo]

name=Extra Packages for Enterprise Linux 7 - $basearch - Debug

#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch/debug

mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch

failovermethod=priority

enabled=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

gpgcheck=1

 

[epel-source]

name=Extra Packages for Enterprise Linux 7 - $basearch - Source

#baseurl=http://download.fedoraproject.org/pub/epel/7/SRPMS

mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch

failovermethod=priority

enabled=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

gpgcheck=1 

然后:# yum makecache

执行完之后检查下yum repolist

101.JPG

然后执行yum install mysql即可安装mysql

102.JPG

 

(责任编辑:IT)
------分隔线----------------------------
栏目列表
推荐内容