最近在玩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. ES5和ES6那些你必须知道的事儿(二)

    ES5和ES6那些你必须知道的事儿 ES5新增的东西 二.对象方法 1.Object.getPrototypeOf(object) 返回对象的原型 function Pasta(grain, widt ...

  2. VMware与Centos系统安装、重置root密码

    VMware与Centos系统安装   今日任务 .Linux发行版的选择 .vmware创建一个虚拟机(centos) .安装配置centos7 .xshell配置连接虚拟机(centos) 选择性 ...

  3. equals方法使用技巧

    Object类中的equals方法用于检测一个对象是否等于另外一个对象.在Object类中,这个方法将判断两个对象是否具有相同的引用. 如果两个对象那个具有相同的引用,他们一定是相同的,从这方面看,将 ...

  4. leetcode python 032 识别最长合法括号

    # 给定一个只包含字符'('和')'的字符串,# 找到最长的有效(格式良好)括号子字符串的长度.# 对于“(()”,最长的有效括号子串是“()”,其长度为2.# 另一个例子是“)()())”,其中最长 ...

  5. Selenium HTMLTestRunner 执行测试成功但无法生成报告

    为什么用PyCharm或者Eclipse执行测试成功但无法生成HTMLTestRunner报告 最近遇到一些人问这样的问题: 他们的代码写的没问题,执行也成功了,但就是无法生成HTMLTestRunn ...

  6. 无法对含有多个.java(或.class)文档的程序进行编译(或解释)

    通常初学者会出现这样的问题:无法对含有多个.java(或.class)文档的程序进行编译(或解释). root@yogile-VirtualBox:/alive/string# javac work/ ...

  7. day 10 函数入门

    def login(): """ """ 执行函数不会报错

  8. laravel 常用命令

    1.创建控制器 php artisan make:controller ArticleController // 带 restful 风格 php artisan make:controller Ar ...

  9. ecmall 移动端 微信分享

    /* 用户判断是否在微信端 */ $this->assign('isWeixin', isWeixin()); //isWeixin() 在系统核心基础类的ecmall.php里定义好了 是微信 ...

  10. Apache Hive处理数据示例

    继上一篇文章介绍如何使用Pig处理HDFS上的数据,本文将介绍使用Apache Hive进行数据查询和处理. Apache Hive简介 首先Hive是一款数据仓库软件 使用HiveQL来结构化和查询 ...