未满足对旧 Ubuntu 版本 (10.10) 的依赖关系

未满足对旧 Ubuntu 版本 (10.10) 的依赖关系

我正在尝试在旧的 Ubuntu 机器(Ubuntu 10.10,Maverick)上安装 git。但我收到以下错误:

sudo apt-get install git
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 git : Depends: liberror-perl but it is not going to be installed
       Depends: libdigest-sha1-perl but it is not going to be installed
 libc-dev-bin : Depends: libc6 (< 2.13) but 2.17-92+b1 is to be installed
 libc6 : Recommends: libc6-i686
         Breaks: locales (< 2.17) but 2.13+git20100825-1 is to be installed
 libc6-dev : Depends: libc6 (= 2.12.1-0ubuntu10.2) but 2.17-92+b1 is to be installed
 libnih1 : Depends: libc6 (< 2.13) but 2.17-92+b1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

所以我做这-f部分:

sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
 libc-dev-bin : Depends: libc6 (< 2.13) but 2.17-92+b1 is installed
 libc6 : Recommends: libc6-i686
         Breaks: locales (< 2.17) but 2.13+git20100825-1 is installed
 libc6-dev : Depends: libc6 (= 2.12.1-0ubuntu10.2) but 2.17-92+b1 is installed
 libnih1 : Depends: libc6 (< 2.13) but 2.17-92+b1 is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

问题是,我无法更新 Ubuntu 内核(由于一些古老的软件,但正在处理该问题)。

所以我的问题相当简单......我怎样才能修复这些依赖关系?

这是输出cat /etc/apt/sources.list

# deb http://us.archive.ubuntu.com/ubuntu/ maverick main restricted
# deb http://us.archive.ubuntu.com/ubuntu/ maverick-updates main restricted
# deb http://security.ubuntu.com/ubuntu maverick-security main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

deb http://old-releases.ubuntu.com/ubuntu/ maverick main restricted
deb-src http://old-releases.ubuntu.com/ubuntu/ maverick main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://old-releases.ubuntu.com/ubuntu/ maverick-updates main restricted
deb-src http://old-releases.ubuntu.com/ubuntu/ maverick-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://old-releases.ubuntu.com/ubuntu/ maverick universe
deb-src http://old-releases.ubuntu.com/ubuntu/ maverick universe
deb http://old-releases.ubuntu.com/ubuntu/ maverick-updates universe
deb-src http://old-releases.ubuntu.com/ubuntu/ maverick-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://old-releases.ubuntu.com/ubuntu/ maverick multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ maverick multiverse
deb http://old-releases.ubuntu.com/ubuntu/ maverick-updates multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ maverick-updates multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://us.archive.ubuntu.com/ubuntu/ maverick-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ maverick-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu maverick partner
# deb-src http://archive.canonical.com/ubuntu maverick partner

## Uncomment the following two lines to add software from Ubuntu's
## 'extras' repository.
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
# deb http://extras.ubuntu.com/ubuntu maverick main
# deb-src http://extras.ubuntu.com/ubuntu maverick main

deb http://security.ubuntu.com/ubuntu maverick-security main restricted
deb-src http://security.ubuntu.com/ubuntu maverick-security main restricted
deb http://security.ubuntu.com/ubuntu maverick-security universe
deb-src http://security.ubuntu.com/ubuntu maverick-security universe
deb http://security.ubuntu.com/ubuntu maverick-security multiverse
deb-src http://security.ubuntu.com/ubuntu maverick-security multiverse

这是输出apt-get check

sudo apt-get check
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 libc-dev-bin : Depends: libc6 (< 2.13) but 2.17-92+b1 is installed
 libc6 : Recommends: libc6-i686
         Breaks: locales (< 2.17) but 2.13+git20100825-1 is installed
 libc6-dev : Depends: libc6 (= 2.12.1-0ubuntu10.2) but 2.17-92+b1 is installed
 libnih1 : Depends: libc6 (< 2.13) but 2.17-92+b1 is installed
E: Unmet dependencies. Try using -f.

的输出sudo dpkg --configure -a

sudo dpkg --configure -a
dpkg: dependency problems prevent configuration of locales:
 libc6 (2.17-92+b1) breaks locales (<< 2.17) and is installed.
  Version of locales to be configured is 2.13+git20100825-1.
dpkg: error processing locales (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 locales

答案1

您已经获得了libc6比 Maverick 存储库中可用的更新的版本。要恢复到 Maverick 的适当版本,您可以运行

sudo apt-get install libc6=2.12.1-0ubuntu10.4 libc-bin=2.12.1-0ubuntu10.4 libc6-dev=2.12.1-0ubuntu10.4 libc-dev-bin=2.12.1-0ubuntu10.4

如果libc6安装了较新的软件包来支持其他一些软件包,那么您需要删除该其他软件包,或者升级与libc6适当版本相关的软件包(从您提供的日志中,这些是localeslibc6-devlibc-dev-binlibnih1)。

相关内容