• 1
  • 2
  • 3
  • 4
  • 5
阿里云主机ECS 首 页  »  帮助中心  »  云服务器  »  阿里云主机ECS
centos7.0使用yum安装mysql报错的处理办法
发布日期:2015-12-25 10:12:21

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


  原因是阿里云提供的一键安装包配置环境,会更新为阿里云的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


  然后执行yum install mysql就能够安装mysql了