云优惠
 云服务器优惠大全

首页    数据库    云服务器 ECS Ubuntu 安装 MySQL Server 提示 mysql-server : Depends: mysql-server-5.5

云服务器 ECS Ubuntu 安装 MySQL Server 提示 mysql-server : Depends: mysql-server-5.5

创建时间:2019-02-18 08:28
浏览量:0
收藏

问题现象
使用 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 的方式安装的,那么这种安装方式通常是能够自动解决依赖关系。

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

解决方案

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

免费领取阿里云1888元代金券大礼包

 

阿里云新老用户均可领取!
自领取后:限时7天使用!

阿里云服务器2折优惠:低至293元/年

 

 

突发性能实例t5 1核1G:293元/年

突发性能实例t5 1核2G:459元/年

突发性能实例t5 2核4G:798元/年

共享型xn4实例1核1G内存:394元/年

共享型n4实例1核2G内存:653元/年

计算网络增强型实例2核4G内存:1566元/年

计算网络增强型实例4核8G内存:2991元/年

点此查看2折活动详情

阿里云高性能云服务器

 

 

网络增强型云服务器:2核4G ¥720元/年

高频应用云服务器:8核16G ¥4109元/年

本地SSD型云服务器:4核16G ¥6218.40元/年

大数据型云服务器:8核32G ¥11375.00元/年

GPU异构云服务器:16核40G ¥15563.00元/年

新用户满立减:每满1000立减50

 

1、到阿里云官网选购产品
2、加入到购物车
3、结算时立享满减

注意:新用户首次购买时必须先加到购物车,然后一起结算才享受此优惠。

腾讯云CVM云服务器22.07元起

 

 

腾讯云1核1G:22.07元/月、794.73元/3年

腾讯云2核2G:36.48元/月、1313.35元/3年

腾讯云2核4G:43.01元/月、1548.5元/3年

腾讯云4核8G:178.5元/月、6426元/3年