我无法通过 apt 或 dpkg 安装或删除任何软件包。我没有安装 aptitude。以下是我 ubuntu 版本 - 12.04 上未满足的依赖关系:
The following packages have unmet dependencies:
libc-dev-bin : Depends: libc6 (< 2.16) but 2.19-0ubuntu6.6 is installed
libc6-dev : Depends: libc6 (= 2.15-0ubuntu10.12) but 2.19-0ubuntu6.6 is installed
libnih1 : PreDepends: libc6 (< 2.16) but 2.19-0ubuntu6.6 is installed
libusb-1.0-0 : Depends: libudev1 (>= 183) but it is not installable
dpkg --purge libc-dev-bin
dpkg: dependency problems prevent removal of libc-dev-bin:
libc6-dev depends on libc-dev-bin (= 2.15-0ubuntu10.12); however:
Package libc-dev-bin is to be removed.
dpkg: error processing libc-dev-bin (--purge):
dependency problems - not removing
dpkg --purge libc6-dev
dpkg: dependency problems prevent removal of libc6-dev:
zlib1g-dev depends on libc6-dev | libc-dev; however:
Package libc6-dev is to be removed.
Package libc-dev is not installed.
Package libc6-dev which provides libc-dev is to be removed.
comerr-dev depends on libc6-dev | libc-dev; however:
Package libc6-dev is to be removed.
Package libc-dev is not installed.
Package libc6-dev which provides libc-dev is to be removed.
build-essential depends on libc6-dev | libc-dev; however:
Package libc6-dev is to be removed.
Package libc-dev is not installed.
Package libc6-dev which provides libc-dev is to be removed.
wireless-bcm43142-precise-dkms depends on libc6-dev.
libstdc++6-4.6-dev depends on libc6-dev (>= 2.13-0ubuntu6).
libexpat1-dev depends on libc6-dev | libc-dev; however:
Package libc6-dev is to be removed.
Package libc-dev is not installed.
Package libc6-dev which provides libc-dev is to be removed.
libtool depends on libc6-dev | libc-dev; however:
Package libc6-dev is to be removed.
Package libc-dev is not installed.
Package libc6-dev which provides libc-dev is to.............
dpkg -s libc6-dev
Package: libc6-dev
Status: purge ok installed
Multi-Arch: same
Priority: optional
Section: libdevel
Installed-Size: 11595
Maintainer: Ubuntu Developers <[email protected]>
Architecture: amd64
Source: eglibc
Version: 2.15-0ubuntu10.12
Provides: libc-dev
Depends: libc6 (= 2.15-0ubuntu10.12), libc-dev-bin (= 2.15-0ubuntu10.12), linux-libc-dev
Recommends: gcc | c-compiler
Suggests: glibc-doc, manpages-dev
Breaks: binutils (<< 2.20.1-1), binutils-gold (<< 2.20.1-11), cmake (<< 2.8.4+dfsg.1-5), gcc-4.4 (<< 4.4.6-3ubuntu1), gcc-4.4-base (<< 4.4.6-3ubuntu1), gcc-4.5 (<< 4.5.3-1ubuntu2), gcc-4.5-base (<< 4.5.3-1ubuntu2), gcc-4.6 (<< 4.6.0-12), gcj-4.4-base (<< 4.4.6-2ubuntu2), gcj-4.5-base (<< 4.5.3-1ubuntu2), gnat-4.4-base (<< 4.4.6-1ubuntu3), libhwloc-dev (<< 1.2-3), libjna-java (<< 3.2.7-4), liblouis-dev (<< 2.3.0-2), liblouisxml-dev (<< 2.4.0-2), make (<< 3.81-8.1), pkg-config (<< 0.26-1)
看来我当前所需的软件包不知何故依赖于旧版本的 libc6-dev (2.15-0ubuntu10.12)。我该如何修复这个问题?我尝试关注一些其他相关线程,但到目前为止未能修复它。有人可以帮忙吗?
答案1
我能够通过 Aptitude 修复该问题。它很酷,而且似乎功能强大得多。它自动降级了一些软件包,删除了许多软件包,安装了一些软件包并修复了依赖项。感谢 Zacharee1 提供此提示。我强烈推荐使用 aptitude 来管理软件包,尤其是在 dpkg 或 apt-get 失败时。