• 1
  • 2
  • 3
  • 4
  • 5
阿里云主机ECS 首 页  »  帮助中心  »  云服务器  »  阿里云主机ECS
ECS ubuntu 14.04 安装MySQL Server提示“mysql-server : Depends: mysql-server-5.5”错误的分析解决
发布日期:2015-12-27 15:12:43

  使用 Ubuntu 14.04 系统在安装mysql-server时出现报错信息,如下所示:

  eading package lists... Done

  Building dependency tree

  Reading state information... Done

  Some packages could not be installed. This may mean that you have

  requested an impossible situation or if you are using the unstable

  distribution that some required packages have not yet been created

  or been moved out of Incoming.

  The following information may help to resolve the situation:

  The following packages have unmet dependencies:

  mysql-server : Depends: mysql-server-5.5 but it is not going to be instaed

  E: Unable to correct problems, you have held broken packages.

  可看到报错是无法解决mysql-server安装时的依赖关系而导致的。

  因为用户是使用apt-get的方式安装的,那么这种安装方式通常是能够自动解决依赖关系。

  解决思路:

  因为系统自带的安装源无法解决安装包依赖问题,更换为新的安装源,解决包依赖问题,安装软件。

  解决方法:

  方法一:

  1.通过wget http://oss.aliyuncs.com/aliyunecs/update_source.tgz 下载update_source的压缩包。

  2.tar xvf update_source.tgz解压后予执行权限 chmod 777 update_source.sh。

  3.执行该脚本./update_source.sh进行自动变更源操作。

  方法二:

  cp -a /etc/apt/source.list /etc/apt/source.list.bak //备份/etc/apt/source.list文件

  vim /etc/apt/source.list

  在最前面添加一下内容

  deb http://mirrors.aliyun.com/ubuntu/ precise main restricted universe multiverse

  deb http://mirrors.aliyun.com/ubuntu/ precise-security main restricted universe multiverse

  deb http://mirrors.aliyun.com/ubuntu/ precise-updates main restricted universe multiverse

  deb http://mirrors.aliyun.com/ubuntu/ precise-proposed main restricted universe multiverse

  deb http://mirrors.aliyun.com/ubuntu/ precise-backports main restricted universe multiverse

  deb-src http://mirrors.aliyun.com/ubuntu/ precise main restricted universe multiverse

  deb-src http://mirrors.aliyun.com/ubuntu/ precise-security main restricted universe multiverse

  deb-src http://mirrors.aliyun.com/ubuntu/ precise-updates main restricted universe multiverse

  deb-src http://mirrors.aliyun.com/ubuntu/ precise-proposed main restricted universe multiverse

  deb-src http://mirrors.aliyun.com/ubuntu/ precise-backports main restricted universe multiverse

  apt-get update //更新一下列表