debian系统的另一个包管理器aptitude

Posted blog of asml

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了debian系统的另一个包管理器aptitude相关的知识,希望对你有一定的参考价值。

最近在玩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)]

自动解决依赖问题!

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

以上是关于debian系统的另一个包管理器aptitude的主要内容,如果未能解决你的问题,请参考以下文章

Linux 软件安装

程序包管理与程序编译安装(第九章)

debian9部署jenkins

Debian下安装中文包和输入法

[读书笔记]Linux命令行与shell编程读书笔记04 安装软件,编辑器注意事项

怎么在手机上安装开源linux操作系统debian