V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
alexapollo
V2EX  ›  程序员

hostus ubuntu 15.04 内核还是 2.6.32? mysql 也装不上……

  •  
  •   alexapollo ·
    geekan · 2016-01-30 19:52:41 +08:00 · 4754 次点击
    这是一个创建于 3223 天前的主题,其中的信息可能已经有所发展或是发生改变。

    mysql 也装不上的 vps 还是第一次遇见
    各位 V 友有碰到类似的问题吗?如何解决的?

    waste: 5+ hours

    第 1 条附言  ·  2016-01-31 00:22:51 +08:00

    之前怀疑是依赖的包太老了,顺手也看了下内核模块,加强了怀疑。
    以前是做虚拟化的( 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 都没解决以上的问题。

    第 2 条附言  ·  2016-01-31 01:05:48 +08:00
    搞定。
    apt-get install perl-base=5.18.2-2ubuntu1
    把 perl-base 重新安装了之后就好了,是因为中间几个包写死了 perlapi 的版本依赖,太坑爹了

    主要是参考了一篇 SU 的问题,使用 apt-cache show <pkg> 看了几个包的 provide/require 确定了问题。
    SU 问题: http://superuser.com/questions/797329/apt-get-wants-to-autoremove-core-packages

    最后,心得,作为一个以前把项目代码编译二进制封 SO 打 RPM 制 ISO 都一天内搞定的具有强大受虐能力的码农,我表示这种问题也太 TM 坑爹了,不是一个很熟悉这套系统的人就会浪费数以小时计的时间在这种细枝末节的问题上。

    anyway ,其实也只是为了一个香港的便宜 VPS ,自作孽。。
    26 条回复    2016-02-01 04:02:06 +08:00
    czkwg8
        1
    czkwg8  
       2016-01-30 20:12:39 +08:00
    OVZ 的机器肯定是这样的啊
    yimity
        2
    yimity  
       2016-01-30 20:12:40 +08:00 via iPhone
    ovz 的只能到这个版本
    Strikeactor
        3
    Strikeactor  
       2016-01-30 20:15:45 +08:00
    想自己升内核版本还是上全虚拟化吧
    不过 mysql 装不上是第一次听说,包管理器直接安也不行?
    acrisliu
        4
    acrisliu  
       2016-01-30 20:33:12 +08:00 via Android
    Ovz 内核没见过 3 开头的
    wbsdty331
        5
    wbsdty331  
       2016-01-30 20:35:23 +08:00
    因为 OpenVZ 官方就只提供了 2.6.32 的,没有更高的
    DesignerSkyline
        6
    DesignerSkyline  
       2016-01-30 20:45:48 +08:00
    对的, OVZ 的内核基本都停留在 2.6 ,版瓦工也这样,还是挺正常的
    denghongcai
        7
    denghongcai  
       2016-01-30 21:00:59 +08:00
    你要说 docker 不能用我还可以理解, MySQL 装不上和 2.6 内核有什么关系
    vboar
        8
    vboar  
       2016-01-30 21:42:20 +08:00
    是不是 dependency 的问题?我之前也装不了,然后 apt-get install bsdutils 就 ok 了
    zrj766
        9
    zrj766  
       2016-01-30 21:48:11 +08:00 via Android
    快来我 CentOS 阵营吧(๑>؂<๑)
    xuan880
        10
    xuan880  
       2016-01-30 22:26:54 +08:00
    之前我用的是搬瓦工的 64m 内存的 vps , mysql 死活安装不了,后来网上找了半天发现有人说 openvz 的 vps 内存要 512M 才可以正常安装 mysql ,今天升级了一下 vps ,内存变成了 512 之后成功安装,只能说搬瓦工下面小内存低端 vps 无法安装 mysql ,至于到底多少 M 内存才能安装我就不知道了。
    edsgerlin
        11
    edsgerlin  
       2016-01-30 22:36:53 +08:00
    @acrisliu
    @wbsdty331 https://openvz.org/Download/kernel 其实已经到 3.10 了,不过还在 Testing 。
    alexapollo
        12
    alexapollo  
    OP
       2016-01-31 00:17:04 +08:00
    @vboar 是 dependency 的问题,但这个命令没有解决
    ovear
        13
    ovear  
       2016-01-31 00:37:37 +08:00
    debian 系出事三部曲 lz 试过没
    apt-get clean
    apt-get update
    apt-get -f install

    另外确定下 release 版和 apt 源
    alexapollo
        14
    alexapollo  
    OP
       2016-01-31 00:41:22 +08:00
    @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 专有的源,有点怀疑是这个的问题
    alexapollo
        15
    alexapollo  
    OP
       2016-01-31 00:41:46 +08:00
    @ovear 三部曲有的,确定是最新的了。
    xseven007
        16
    xseven007  
       2016-01-31 00:42:21 +08:00
    13 楼正解。顺便再不行就 rm -rf /var/cache/apt
    应该就正常了。
    alexapollo
        17
    alexapollo  
    OP
       2016-01-31 00:50:48 +08:00
    @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
    alexapollo
        18
    alexapollo  
    OP
       2016-01-31 00:51:14 +08:00
    @xseven007 最后显示 E: Package 'perlapi-5.18.1' has no installation candidate 这个应该是解谜关键。。
    ovear
        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
    返回结果看看是哪里的
    ovear
        20
    ovear  
       2016-01-31 00:54:20 +08:00
    )顺便 libdbi-perl 和 mysql-server 也查查 我觉得是源被污染了
    jonsun30
        21
    jonsun30  
       2016-01-31 01:02:25 +08:00
    @edsgerlin 不知道要 testing 到什么时候。。。
    alexapollo
        22
    alexapollo  
    OP
       2016-01-31 01:02:27 +08:00
    @ovear 搞定。
    apt-get install perl-base=5.18.2-2ubuntu1
    把 perl-base 重新安装了之后就好了,是因为中间几个包写死了 perlapi 的版本依赖,太坑爹了
    ovear
        23
    ovear  
       2016-01-31 01:05:59 +08:00
    @alexapollo 搞定就好-0-
    我一般都不怎么带版本的 hhh
    alexapollo
        24
    alexapollo  
    OP
       2016-01-31 01:08:46 +08:00
    @ovear thx!
    ovear
        25
    ovear  
       2016-01-31 01:10:29 +08:00
    @alexapollo 没事=.=
    pynix
        26
    pynix  
       2016-02-01 04:02:06 +08:00
    坑爹
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5817 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 01:45 · PVG 09:45 · LAX 17:45 · JFK 20:45
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.