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

Ubuntu安装libssl-dev失败(依靠aptitude管理降级软件)并记录dpkg展示安装软件列表的更多相关文章

  1. linux(ubuntu) 安装composer(PHP用来管理依赖关系的工具 ) 和安装中国全量镜像

    https://www.phpcomposer.com/  composer中文网 1:进入安装目录   cd /usr/local/bin 2:下载并安装     sudo curl -s http ...

  2. U盘安装Ubuntu Server CD-ROM挂载失败

    U盘安装 Ubuntu Server 发生Failed to copy file from CD-ROM问题 使用UltraISO制作Ubuntu Server安装盘,在安装过程中出现[!!] Loa ...

  3. Ubuntu下安装RabbbitVCS(图形化svn管理工具)- Ubuntu也有TortoiseSVN

    在Windows下用惯了TortoiseSVN这只小乌龟,到了Ubuntu下很不习惯命令行的SVN,于是经过一番寻找安装了RabbitVCS这款SVN图形化前端工具(官方网站:http://rabbi ...

  4. ubuntu下vscode安装go插件失败解决办法

    go env -w GO111MODULE=on go env -w GOPROXY=https://goproxy.io,direct go env -w GOSUMDB=gosum.io+ce6e ...

  5. 安装Ubuntu16.04失败

    原本安装的是Ubuntu14,但是在使用caffe时总是出错,所以干脆将Ubuntu从14升级到16,结果整出一堆麻烦.在解决这些麻烦的过程也学习了不少系统启动的细节.印证了那句话"如何没有 ...

  6. GitHub学习心得之 安装配置与多帐号管理

    作者:枫雪庭 出处:http://www.cnblogs.com/FengXueTing-px/ 欢迎转载 GitHub学习心得之 安装配置与多帐号管理 1.前言2.GitHub Linux安装(ub ...

  7. OpenStack Havana 部署在Ubuntu 12.04 Server 【OVS+GRE】(三)——计算节点的安装

    序:OpenStack Havana 部署在Ubuntu 12.04 Server [OVS+GRE] 计算节点: 1.准备结点 安装好ubuntu 12.04 Server 64bits后,进入ro ...

  8. 安装vmware tools失败解决方法

    失败提示: reating a new initrd boot image for the kernel. update-initramfs: Generating /boot/initrd.img- ...

  9. 利用cocoapods管理开源项目,支持 pod install安装整个流程记录(github公有库)

    利用cocoapods管理开源项目,支持 pod install安装整个流程记录(github公有库),完成预期的任务,大致有下面几步: 1.代码提交到github平台 2.创建.podspec 3. ...

随机推荐

  1. vue首页组件切换

    结构如下 代码如下: <template> <div id="page"> <div style="width: 100%" cl ...

  2. Windows下直接双击可执行的jar

    如果没有设置,那么就是用命令行: jar处在文件夹路径下打开命令行:java -jar xxx.jar 总的来说是有点不方便 首先默认打开jar程序得是相同jdk的java.exe 然后是一闪而过 下 ...

  3. Python基础总结之第七天开始【总结字符串、列表、元组的常用方法】(新手可相互督促)

    前面的笔记说,python中的一切数据类型都是对象 我们在细化下就是:对象可由两部分组成:对象数据和对象方法 针对不同类型的数据对象,有不同的操作对象的方法. 那么我们开始看下字符串对象的常用方法: ...

  4. python以不同方式打印输出九九乘法表

    参考:http://www.cnblogs.com/suiy-160428/p/5594389.htmlpython输出 9*9 乘法口诀表 矩形输出九九乘法表: for i in range(1,1 ...

  5. Go语言之依赖管理

    Go语言之依赖管理 Go语言的依赖管理随着版本的更迭正逐渐完善起来. 依赖管理 为什么需要依赖管理 最早的时候,Go所依赖的所有的第三方库都放在GOPATH这个目录下面.这就导致了同一个库只能保存一个 ...

  6. 5分钟搞定图片鉴黄web应用!

    函数工作流(FunctionGraph,FGS)是一项基于事件驱动的函数托管计算服务,托管函数具备以毫秒级弹性伸缩.免运维.高可靠的方式运行.通过函数工作流,开发者无需配置和管理服务器,只需关注业务逻 ...

  7. Django中 auto_now_add 和 auto_now 的区别

    auto_now_add = True #创建时添加的时间 修改数据时,不会发生改变 auto_now = True #修改数据的时间,每次修改都会有变动 ........

  8. nodeJS中使用mongoose模块操作mongodb数据库

    在实际运用中,对于数据库的操作我们不可能一直在cmd命令行中进行操作,一般情况下需要在node环境中来操作mongodb数据库,这时就需要引入mongoose模块来对数据库进行增删改查等操作. 首先, ...

  9. MYSQL WHERE语句

    过滤条件(WHERE)   如果你失忆了,希望你能想起曾经为了追求梦想的你.   QQ群:651080565(php/web 学习课堂)   例子:淘宝首页上,我们会看到很多个商品,但这些商品,并不是 ...

  10. 在php中连接数据库 pdo

    在php中连接数据库 pdo //数据库信息 $mysql_conf = array( 'host' => '127.0.0.1', 'db' => 'meteorolog_foreign ...