最近在玩OPI的时候遇到了一个包因为各种依赖问题死活装不上.苦搜很久找到这个aptitude.

基于debain衍生的各种操作系统比较常用包管理器是apt,不过apt在遇到依赖问题的时候处理得不是很好.

就像这样:

The following packages have unmet dependencies:
build-essential : Depends: libc6-dev but it is not going to be installed or
libc-dev
g++ : Depends: g++-4.9 (>= 4.6.4-1~) but it is not going to be installed
libboost-dev : Depends: libboost1.55-dev but it is not going to be installed
libfreetype6-dev : Depends: libc6-dev but it is not going to be installed or
libc-dev
libncurses5-dev : Depends: libc6-dev but it is not going to be installed or
libc-dev
libpam0g-dev : Depends: libc6-dev but it is not going to be installed or
libc-dev
libpcre3-dev : Depends: libc6-dev but it is not going to be installed
libpng12-dev : Depends: libpng12-0 (= 1.2.50-2+deb8u3) but 1.2.51-0ubuntu3 is to be installed
libxml2-dev : Depends: libxml2 (= 2.9.1+dfsg1-5+deb8u6) but 2.9.2+dfsg1-3 is to be installed
zlib1g-dev : Depends: zlib1g (= 1:1.2.8.dfsg-2) but 1:1.2.8.dfsg-2ubuntu1 is to be installed
Depends: libc6-dev but it is not going to be installed or
libc-dev
E: Unable to correct problems, you have held broken packages.

apt会报个错然后就不管了,你自己解决

而aptitude会自动找出包依赖的问题,给提供解决方案:

The following packages have unmet dependencies:
libc6-dev : Depends: libc6 (= 2.19-18+deb8u10) but 2.21-0ubuntu4 is installed.
libc-dev-bin : Depends: libc6 (< 2.20) but 2.21-0ubuntu4 is installed.
The following actions will resolve these dependencies: Keep the following packages at their current version:
1) libc-dev-bin [Not Installed]
2) libc6-dev [Not Installed] Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies: Upgrade the following packages:
1) locales [2.13+git20120306-19 (now) -> 2.19-18+deb8u10 (oldstable)] Downgrade the following packages:
2) libc-bin [2.21-0ubuntu4 (now) -> 2.19-18+deb8u10 (oldstable)]
3) libc6 [2.21-0ubuntu4 (now) -> 2.19-18+deb8u10 (oldstable)]

首先给出了1个方案:

1)     libc-dev-bin [Not Installed]
2) libc6-dev [Not Installed]

问我是否接受,我答n以后给了第二个方案

1)     locales [2.13+git20120306-19 (now) -> 2.19-18+deb8u10 (oldstable)]
Downgrade the following packages:
2) libc-bin [2.21-0ubuntu4 (now) -> 2.19-18+deb8u10 (oldstable)]
3) libc6 [2.21-0ubuntu4 (now) -> 2.19-18+deb8u10 (oldstable)]

自动解决依赖问题!

用这个命令安装aptitude:

sudo apt install -y aptitude

有个别情况需要多试几种方案

debian系统的另一个包管理器aptitude的更多相关文章

  1. rpm 包管理器

    rpm 包管理器 二进制应用程序的组成部分: 二进制文件.库文件.配置文件.帮助文件 程序包管理器:不同厂商的程序,包管理器也不同. debian:deb文件, dpkg包管理器 redhat: rp ...

  2. 你需要知道的包管理器(Package Manager)

    最近我花了一点时间关注了在不同系统之中所用到的包管理器(Package Manager) .最开始的时候,我是在使用Linux操作系统时,对这种工具以及它背后的想法深深迷恋住了:这真是自由的软件世界. ...

  3. #VSTS日志# 15/11/18 插件应用市场,RM,包管理器等

    [小编]从今天开始,我将在这个博客上连载Visual Studio Team Service的定期更新.VSTS是Team Foundation Server 的在线版本,微软每3周会对这个服务进行更 ...

  4. Bower => 前端开发也有包管理器

    摘要: 一直以来npm,pip等各种包管理器好像都和前端开发没什么太大关系,当然因为nodejs的原因可能感觉npm会亲切一些,不过终归不是针对客户端的包管理工作,所以Bower的出现确实让人眼前一亮 ...

  5. 【VSTS 日志 15/11/18】 – 插件应用市场,RM,包管理器等

    [小编]从今天开始,我将在这个博客上连载Visual Studio Team Service的定期更新.VSTS是Team Foundation Server 的在线版本,微软每3周会对这个服务进行更 ...

  6. .NET持续集成与自动化部署之路第二篇——使用NuGet.Server搭建公司内部的Nuget(包)管理器

    使用NuGet.Server搭建公司内部的Nuget(包)管理器 前言     Nuget是一个.NET平台下的开源的项目,它是Visual Studio的扩展.在使用Visual Studio开发基 ...

  7. 【Python系列】Python包管理器pip

    缘起 这段时间忙着给朋友搞事,忙了好长一段时间,木有写博客很长时间了.之间做了两个东西,一个是邮件自动发送脚本,一个是数据处理软件.其中,在做数据处理软件的时候使用到了非Python系统库,是两个第三 ...

  8. Linux系统-----包管理器的演变

    每个电脑设备都使用某种形式的软件来执行其预定任务.在软件开发的早期,对产品进行了严格的bug和其他缺陷测试.在过去的十多年里,软件通过互联网发布,目的是通过应用新版本的软件来修复任何错误.在某些情况下 ...

  9. 包管理器Bower使用手冊之中的一个

    包管理器Bower使用手冊之中的一个 作者:chszs,转载需注明.博客主页:http://blog.csdn.net/chszs 一.Bower介绍 Bower是一个适合Web应用的包管理器,它擅长 ...

随机推荐

  1. STL 小白学习(6) queue

    //queue 一端插入 另一端删除 //不能遍历(不提供迭代器) 不支持随机访问 #include <queue> #include <iostream> using nam ...

  2. mysql5.5大数据量下表结构升级

    升级一张4万多行(增加一个字段),且包含blob字段的表(blob字段包含100KB左右的数据),运行alter语句:ALTER TABLE `imgdetail` ADD COLUMN  `uplo ...

  3. CAD{绘制坡道)(绘制楼梯)5.26

    “楼梯其他”“坡道”编辑坡道的各项数据, 三维图中坡道反了.在平面图中镜像,“MI"镜像坡道.给坡道一个箭头引注, 绘制楼梯:”楼梯其他“”双跑楼梯“编辑参数,绘制楼梯,双击楼梯,改变成首层 ...

  4. 朋友给的IE滚动条

    scrollbar-arrow-color: #f4ae21;  /*图6,三角箭头的颜色*/scrollbar-face-color: #333;  /*图5,立体滚动条的颜色*/scrollbar ...

  5. windows线程池

    #define _WIN32_DCOM #include <SDKDDKVer.h> #include <direct.h> #include <thr/threads. ...

  6. 笨办法29IF语句

    people = 20 cats = 30 dogs = 15 if people < cats: print "Too many cats! The world is doomed! ...

  7. web.xml配置说明

    前言 首先,web.xml文件的作用是配置web项目启动时加载的信息.(web.xml并不是一个Web的必要文件,没有web.xml,网站仍然是可以正常工作的.) 而这些配置自然是通过标签来实现的, ...

  8. 使用Stickers拓展集成iMessage简单功能

    添加一个target,选择Stickers拓展: 然后就会出现iMessage的文件夹:添加你需要的iMessage图片,这里图片遵循下面的要求: Small: 100 x 100 pt @3x sc ...

  9. 用matlab生成mif文件

    在FPGA中,rom模块的初始化文件分为两种,一种是hex文件,另外一种是mif文件,这两种文件都可以通过Quartus进行手工创建,进行手工输入数据,也可以借助于专用的文件编辑器完成编辑. 在此介绍 ...

  10. Problem C: 类的初体验(III)

    Description 定义一个类Data,只有一个double类型的属性和如下4个方法: 1.   缺省构造函数,将属性初始化为0,并输出“Initialize a data 0”. 2.  带参构 ...