zoukankan      html  css  js  c++  java
  • Ubuntu安装libssl-dev失败(依靠aptitude管理降级软件)并记录dpkg展示安装软件列表

    Ubuntu 12.04LTS下直接安装 libssl-dev 失败

    提示错误:

    $ sudo apt-get install libssl-dev
    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:
     libssl-dev : Depends: libssl1.0.0 (= 1.0.1-4ubuntu5) but 1.0.1-4ubuntu5.3 is to be installed
                  Recommends: libssl-doc but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
     

    原因:

    已安装的libssl1.0.0版本太高, 无法支持

    $dpkg -l *libssl*
    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    ||/ Name               Version            Description
    +++-==================-==================-====================================================
    un  libssl-dev         <none>             (no description available)
    un  libssl-doc         <none>             (no description available)
    ii  libssl1.0.0        1.0.1-4ubuntu5.3   SSL shared libraries
     

    解决方案:

    使用aptitude软件包管理器

    1. 安装aptitude

    $sudo apt-get install aptitude
     

    2. 使用aptitude安装 libssl-dev包, 采用建议的解决方案(将libssl1.0.0版本降级)

    $sudo aptitude install libssl-dev
    The following NEW packages will be installed:
      libssl-dev{b}
    The following packages are RECOMMENDED but will NOT be installed:
      libssl-doc
    0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
    Need to get 1,528 kB of archives. After unpacking 6,179 kB will be used.
    The following packages have unmet dependencies:
     libssl-dev : Depends: libssl1.0.0 (= 1.0.1-4ubuntu5) but 1.0.1-4ubuntu5.3 is installed.
                  Depends: zlib1g-dev but it is not going to be installed.
    The following actions will resolve these dependencies:
         Keep the following packages at their current version:
    1)     libssl-dev [Not Installed]                        
    Accept this solution? [Y/n/q/?] n
    The following actions will resolve these dependencies:
         Install the following packages:                                          
    1)     zlib1g-dev [1:1.2.3.4.dfsg-3ubuntu4 (precise)]                         
         Downgrade the following packages:                                        
    2)     libssl1.0.0 [1.0.1-4ubuntu5.3 (now) -> 1.0.1-4ubuntu5 (precise-updates)]
    Accept this solution? [Y/n/q/?] y
    The following packages will be DOWNGRADED:
      libssl1.0.0
    The following NEW packages will be installed:
      libssl-dev zlib1g-dev{a}
    The following packages are RECOMMENDED but will NOT be installed:
      libssl-doc
    0 packages upgraded, 2 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
    Need to get 2,707 kB of archives. After unpacking 6,575 kB will be used.
    Do you want to continue? [Y/n/?] y
    Get: 1 http://mirror.lupaworld.com/ubuntu/ precise-updates/main libssl1.0.0 amd64 1.0.1-4ubuntu5 [1,013 kB]
    Get: 2 http://mirror.lupaworld.com/ubuntu/ precise/main zlib1g-dev amd64 1:1.2.3.4.dfsg-3ubuntu4 [165 kB]
    Get: 3 http://mirror.lupaworld.com/ubuntu/ precise-updates/main libssl-dev amd64 1.0.1-4ubuntu5 [1,528 kB]
    Fetched 2,707 kB in 5s (503 kB/s)      
    Preconfiguring packages ...
    dpkg: warning: downgrading libssl1.0.0 from 1.0.1-4ubuntu5.3 to 1.0.1-4ubuntu5.
    (Reading database ... 150648 files and directories currently installed.)
    Preparing to replace libssl1.0.0 1.0.1-4ubuntu5.3 (using .../libssl1.0.0_1.0.1-4ubuntu5_amd64.deb) ...
    Unpacking replacement libssl1.0.0 ...
    Setting up libssl1.0.0 (1.0.1-4ubuntu5) ...
    Processing triggers for libc-bin ...
    ldconfig deferred processing now taking place
    Selecting previously unselected package zlib1g-dev.
    (Reading database ... 150648 files and directories currently installed.)
    Unpacking zlib1g-dev (from .../zlib1g-dev_1%3a1.2.3.4.dfsg-3ubuntu4_amd64.deb) ...
    Selecting previously unselected package libssl-dev.
    Unpacking libssl-dev (from .../libssl-dev_1.0.1-4ubuntu5_amd64.deb) ...
    Processing triggers for man-db ...
    Setting up zlib1g-dev (1:1.2.3.4.dfsg-3ubuntu4) ...
    Setting up libssl-dev (1.0.1-4ubuntu5) ...
     

    验证libssl-dev包安装情况:

    $dpkg -l *libssl*
    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    ||/ Name               Version            Description
    +++-==================-==================-====================================================
    ii  libssl-dev         1.0.1-4ubuntu5     SSL development libraries, header files and document
    un  libssl-doc         <none>             (no description available)
    ii  libssl1.0.0        1.0.1-4ubuntu5     SSL shared libraries
  • 相关阅读:
    Perl 常用的小细节总结
    Linux-root管理员创建新用户
    Linux-普通用户和root用户任意切换
    Linux-设置终端界面的字体颜色和自定义常用快捷功能
    Linux命令行好玩的命令
    如何配一副好的眼镜
    linux下面升级 Python版本并修改yum属性信息
    mysql远程登陆
    Linux 如何找到100M以上的大文件
    将raspberry 3B+的apt替换为国内源
  • 原文地址:https://www.cnblogs.com/wangshaowei/p/11229310.html
Copyright © 2011-2022 走看看