mysql 也装不上的 vps 还是第一次遇见
各位 V 友有碰到类似的问题吗?如何解决的?
waste: 5+ hours
之前怀疑是依赖的包太老了,顺手也看了下内核模块,加强了怀疑。
以前是做虚拟化的( KVM/XEN ),还第一次听说 OVZ ,孤陋寡闻了吗。。
详细日志如下:
root@v2:~# apt-get install mysql-server
Reading 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 installed
E: Unable to correct problems, you have held broken packages.
root@v2:~# apt-get install mysql-server-5.5
Reading 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-5.5 : Depends: libdbi-perl but it is not going to be installed
Depends: mysql-client-5.5 (>= 5.5.47-0ubuntu0.14.04.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
SO/SU 都没解决以上的问题。
1
czkwg8 2016-01-30 20:12:39 +08:00
OVZ 的机器肯定是这样的啊
|
2
yimity 2016-01-30 20:12:40 +08:00 via iPhone
ovz 的只能到这个版本
|
3
Strikeactor 2016-01-30 20:15:45 +08:00
想自己升内核版本还是上全虚拟化吧
不过 mysql 装不上是第一次听说,包管理器直接安也不行? |
4
acrisliu 2016-01-30 20:33:12 +08:00 via Android
Ovz 内核没见过 3 开头的
|
5
wbsdty331 2016-01-30 20:35:23 +08:00
因为 OpenVZ 官方就只提供了 2.6.32 的,没有更高的
|
6
DesignerSkyline 2016-01-30 20:45:48 +08:00
对的, OVZ 的内核基本都停留在 2.6 ,版瓦工也这样,还是挺正常的
|
7
denghongcai 2016-01-30 21:00:59 +08:00
你要说 docker 不能用我还可以理解, MySQL 装不上和 2.6 内核有什么关系
|
8
vboar 2016-01-30 21:42:20 +08:00
是不是 dependency 的问题?我之前也装不了,然后 apt-get install bsdutils 就 ok 了
|
9
zrj766 2016-01-30 21:48:11 +08:00 via Android
快来我 CentOS 阵营吧(๑><๑)
|
10
xuan880 2016-01-30 22:26:54 +08:00
之前我用的是搬瓦工的 64m 内存的 vps , mysql 死活安装不了,后来网上找了半天发现有人说 openvz 的 vps 内存要 512M 才可以正常安装 mysql ,今天升级了一下 vps ,内存变成了 512 之后成功安装,只能说搬瓦工下面小内存低端 vps 无法安装 mysql ,至于到底多少 M 内存才能安装我就不知道了。
|
11
edsgerlin 2016-01-30 22:36:53 +08:00
|
12
alexapollo OP @vboar 是 dependency 的问题,但这个命令没有解决
|
13
ovear 2016-01-31 00:37:37 +08:00
debian 系出事三部曲 lz 试过没
apt-get clean apt-get update apt-get -f install 另外确定下 release 版和 apt 源 |
14
alexapollo OP @ovear 非常怀疑是 apt 源的问题, release 是 14.04 ,不知道具体版本名在哪看
apt 源是: deb http://archive.ubuntu.com/ubuntu trusty main restricted universe deb http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe deb http://security.ubuntu.com/ubuntu trusty-security main restricted universe multiverse deb http://archive.canonical.com/ubuntu trusty partner 看起来不是 OVZ 专有的源,有点怀疑是这个的问题 |
15
alexapollo OP @ovear 三部曲有的,确定是最新的了。
|
16
xseven007 2016-01-31 00:42:21 +08:00
13 楼正解。顺便再不行就 rm -rf /var/cache/apt
应该就正常了。 |
17
alexapollo OP @xseven007 rm 了,也重新更新了,-f 也有带,但仍然是依赖的问题。一个完整的尝试是这样的:
root@v2:~# apt-get -f install mysql-client Reading 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-client : Depends: mysql-client-5.5 but it is not going to be installed E: Unable to correct problems, you have held broken packages. root@v2:~# apt-get -f install mysql-client-5.5 Reading 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-client-5.5 : Depends: libdbd-mysql-perl (>= 1.2202) but it is not going to be installed Depends: libdbi-perl but it is not going to be installed Depends: libterm-readkey-perl but it is not going to be installed E: Unable to correct problems, you have held broken packages. root@v2:~# apt-get -f install libdbi-perl Reading 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: libdbi-perl : Depends: perlapi-5.18.1 E: Unable to correct problems, you have held broken packages. root@v2:~# apt-get -f install perlapi-5.18.1 Reading package lists... Done Building dependency tree Reading state information... Done Package perlapi-5.18.1 is a virtual package provided by: perl-base 5.18.2-2ubuntu1 [Not candidate version] E: Package 'perlapi-5.18.1' has no installation candidate |
18
alexapollo OP @xseven007 最后显示 E: Package 'perlapi-5.18.1' has no installation candidate 这个应该是解谜关键。。
|
19
ovear 2016-01-31 00:52:19 +08:00
@alexapollo 还是一个错么 0 0
lsb_release -a 可以看版本信息 Distributor ID: Ubuntu Description: Ubuntu 14.04.3 LTS Release: 14.04 Codename: trusty codename 就是版本号 源的 deb http://archive.ubuntu.com/ubuntu trusty 第三个参数就是版本号, lz 不是 15 。 04 的嘛? 另外 lz 顺手查查 cache 吧 apt-cache madison perl-base 返回结果看看是哪里的 |
20
ovear 2016-01-31 00:54:20 +08:00
)顺便 libdbi-perl 和 mysql-server 也查查 我觉得是源被污染了
|
22
alexapollo OP @ovear 搞定。
apt-get install perl-base=5.18.2-2ubuntu1 把 perl-base 重新安装了之后就好了,是因为中间几个包写死了 perlapi 的版本依赖,太坑爹了 |
23
ovear 2016-01-31 01:05:59 +08:00
@alexapollo 搞定就好-0-
我一般都不怎么带版本的 hhh |
24
alexapollo OP @ovear thx!
|
25
ovear 2016-01-31 01:10:29 +08:00
@alexapollo 没事=.=
|
26
pynix 2016-02-01 04:02:06 +08:00
坑爹
|