By aptitude downgrade package to resolve dependencies (E: Unable to correct mistakes, because you require some software packages to maintain the status quo)

Dependencies under Linux headache, especially when prompt the following error:

下列软件包有未满足的依赖关系:
xxx : 依赖: xxx 但是它将不会被安装
E: 无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依赖关系。

Checked, because there are a lot of packages to be installed need to rely on lower-level packages, it can be sudo aptitude installto try to solve the problem by downgrading.

For example, I want to install libgtk2.0-dev, but these goods are dependent on an earlier version of the package, this package can not lead to the installation, the solution is as follows:

sudo apt-get install aptitude
# 安装 aptitude 包管理器

sudo aptitude install libgtk2.0-dev
# 提示未满足依赖关系,给出了类似1) libcairo2-dev [未安装的] 等提示,问是否接受该解决方案?[Y/n/q/?]

n
# 不接受该解决方案,然后会提示降级下列软件包,问是否接受该解决方案?[Y/n/q/?] 

y
# 接受降级,此时会发现新安装包列表里果然有libgtk2.0-dev,然后会提示您要继续吗?[Y/n/?]

y
# 继续,确认安装

# 安装成功!其他搞不定的包也可以如此尝试,不过降级之前需要仔细看下版本号变化,如果差太多还需要慎重考虑

Guess you like

Origin www.cnblogs.com/bowen404/p/11970599.html