开发者社区> 问答> 正文

在linux下安装mysql时报错,怎么改?报错

Error Downloading Packages:
  mysql-5.1.71-1.el6.x86_64: failure: Packages/mysql-5.1.71-1.el6.x86_64.rpm from yumserver: [Errno 256] No more mirrors to try.

展开
收起
爱吃鱼的程序员 2020-06-08 21:29:54 1755 0
2 条回答
写回答
取消 提交回答
  • yum源有问题。 修改或增加yum文件。 目录 /etc/yum.repos.d/

    增加CentOS.repo文件,内容如下

    [base] name=CentOS-$releasever - Base - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos/$releasever/os/$basearch/ http://mirrors.aliyuncs.com/centos/$releasever/os/$basearch/ http://mirrors.cloud.aliyuncs.com/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

    #released updates [updates] name=CentOS-$releasever - Updates - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos/$releasever/updates/$basearch/ http://mirrors.aliyuncs.com/centos/$releasever/updates/$basearch/ http://mirrors.cloud.aliyuncs.com/centos/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

    #additional packages that may be useful [extras] name=CentOS-$releasever - Extras - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos/$releasever/extras/$basearch/ http://mirrors.aliyuncs.com/centos/$releasever/extras/$basearch/ http://mirrors.cloud.aliyuncs.com/centos/$releasever/extras/$basearch/ gpgcheck=1 gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

    #additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos/$releasever/centosplus/$basearch/ http://mirrors.aliyuncs.com/centos/$releasever/centosplus/$basearch/ http://mirrors.cloud.aliyuncs.com/centos/$releasever/centosplus/$basearch/ gpgcheck=1 enabled=0 gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

    #contrib - packages by Centos Users [contrib] name=CentOS-$releasever - Contrib - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.aliyun.com/centos/$releasever/contrib/$basearch/ http://mirrors.aliyuncs.com/centos/$releasever/contrib/$basearch/ http://mirrors.cloud.aliyuncs.com/centos/$releasever/contrib/$basearch/ gpgcheck=1 enabled=0 gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

    2020-06-09 10:27:32
    赞同 展开评论 打赏
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    源不行,换一个yum源不行了吧,自己镜像搭一个网易源更改/etc/yum.repos.d/下面的repo文件,更换软件源,中科大、清华、上海交大的均可<spanstyle="color:#3D464D;font-family:"font-size:24px;background-color:#F8F8F8;">sudoaptinstallmysql-servermysql-client回复<aclass='referer'target='_blank'>@lieefu:是呀,就应该用Ubuntu大法,然普通世人皆就说redhat靠谱,centos安全,但我想说,centos6的内核是多少,centos7内核是多少,我们Ubuntuserver14.04内核是多少,不查不知道,一查吓一跳,centos老了,就应该让位给后来者回复<aclass='referer'target='_blank'>@百世经纶之傲笑红尘:让人人耍Ubuntu人家耍的是centos,我们Ubuntu的apt,centos耍不来apt

    2020-06-09 15:45:47
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Alibaba Cloud Linux 3 发布 立即下载
ECS系统指南之Linux系统诊断 立即下载
ECS运维指南 之 Linux系统诊断 立即下载