Ubuntu安装MySQL提示Depends: mysql-server-5.5 but it is not going

赞赏 2016-07-12

使用 Ubuntu 14.04 系统在安装 mysql-server 时出现如下报错信息: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.


详细报错信息:

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. 方案一:修改系统 apt-get 更新配置文件
  2. 方案二:下载阿里云官方 apt-get 源更新脚本

方案一

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 更新一下列表

方案二 

1.下载 apt-get 更新源脚本

wget http://oss.aliyuncs.com/aliyunecs/update_source.tgz

2.解压并赋权脚本

tar xvf update_source.tgz
chmod 777 update_source.sh

3.执行该脚本

./update_source.sh
登陆后阅读全文
阅读 2283 赞赏 0 有用 0 没用 0 收藏 0 分享

   



0 条留言

linux分享的头像

linux分享

每个软件都有确定的用途

相关文章

阿里云·业务运营团队内部的前端构建和工程化工具 Dawn开源

Ubuntu或Debian系统内如何卸载 MySQL 数据库服务?

云服务器 ECS Ubuntu apt-get 在线安装软件和常见问题处理介绍

Ubuntu 如何安装 vnc server?

mysql-bin.00000* 文件误删删除导致mysql启动不起来

Linux screen 提示:There is no screen to be resumed matching

阿里云云盾扫描服务器的的IP段有哪些?

阿里云云盾扫描服务器的的IP段有哪些?

MySQL 上传报错#1064-You have an error in your SQL syntax

Linux 下 MySQL 无法访问的问题如何排查?

有料推荐

这世界欠我一个这样的老公!

高校学生模仿“世界名画”摆拍,可以说是戏精本精了

iPhone X 跌破发行价,苏宁200亿入股恒大 | 财经日日评

果然是高手!这次在日本,特朗普竹杠敲得不是一般狠

资深黄牛现身说法:iPhone X价格秒变不停,就像炒股一样

长一样的双胞胎也能识别?蚂蚁金服发布「眼纹识别」技术

苏联是怎么被阿富汗拖垮的?

美团或入局「分时租赁」共享汽车,王兴要大笔投入「泛出行」领域了? | 36氪独家

你或许被“一盘番茄炒蛋”刷屏了,但有人辛酸,有人质疑

iPhone X发售前夜,黄牛与苹果公司的不安

他的文章

我是如何执行 "rm -rf ~" 的

正态分布为什么常见?(财富的分布却不符合正态分布)

Linux下窗口管理器 xmonad 的使用教程

用披萨做比喻来解释 IaaS,PaaS,SaaS 的区别

如何制作CSR(证书私钥和证书请求文件)文件?

php RedisException with message read error on connection

Windows环境下ping丢包或不通时链路测试工具推荐

Linux下ping丢包或不通时链路测试工具推荐

链路测试结果分析说明及常见链路异常场景和测试报告

SSH 登录时出现如下错误:login: Module is unknown

手机扫一扫
分享文章