无法安装,因为丢失/损坏(虚拟)包

首先:我来自stackoverflow – 我是一个程序员,而不是一个系统pipe理员。 请理解我对这些事情的无能。 我会尽量做到尽可能精确(可能需要重新标题和重新标题)。

我有一个依赖的情况,我不能只是在Debian Etch系统上弄清楚。
我被叫做一个PHP应用程序的维护工作; 因为我需要locales包,所以我尝试了我认为最简单的方法: apt-get install locales ,由于虚拟glibc包的未满足依赖关系而失败。 据我了解,这是由混合来源造成的(所有软件包已经升级)
我问aptitude install locales如果他能修复的东西,他(但一些包降级),但资格本身已被删除。
有没有讨论:这是我的一个愚蠢的事情。 但服务器仍然运行愉快(谢谢Debian!),所以情况并不重要。

问题是:包的情况看起来并没有解决。 如果我尝试重新安装aptitude,这是我得到:

 lsrl:~# apt-get install aptitude Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: aptitude: Depends: libapt-pkg-libc6.3-6-3.11 E: Broken packages 

如果我尝试安装libapt:

 lsrl:~# apt-get install libapt-pkg-libc6.3-6-3.11 Reading package lists... Done Building dependency tree Reading state information... Done Package libapt-pkg-libc6.3-6-3.11 is a virtual package provided by: You should explicitly select one to install. E: Package libapt-pkg-libc6.3-6-3.11 has no installation candidate 

如果我尝试重新安装apt:

 lsrl:~# apt-get --reinstall install apt Reading package lists... Done Building dependency tree Reading state information... Done Reinstallation of apt is not possible, it cannot be downloaded. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 

我的来源:

 lsrl:~# cat /etc/apt/sources.list # # deb cdrom:[Debian GNU/Linux 4.0 r4a-etchnhalf _Etch-and-a-half_ - Official i386 NETINST 20080804-22:00]/ etch main #deb cdrom:[Debian GNU/Linux 4.0 r4a-etchnhalf _Etch-and-a-half_ - Official i386 NETINST 20080804-22:00]/ etch main deb http://ftp.it.debian.org/debian/ etch main contrib non-free deb-src http://ftp.it.debian.org/debian/ etch main contrib non-free # deb http://ftp.it.debian.org/debian/ testing main contrib non-free # deb-src http://ftp.it.debian.org/debian/ testing main contrib non-free deb http://security.debian.org/ etch/updates main contrib non-free deb-src http://security.debian.org/ etch/updates main contrib non-free deb http://volatile.debian.org/debian-volatile etch/volatile main deb-src http://volatile.debian.org/debian-volatile etch/volatile main 

这与以前glibc发生的事情非常类似,我有理由相信还有一些混合的来源/包裹在那里?
有什么办法可以让这一切正常工作吗?

在蚀刻中,apt包应该提供libapt-pkg-libc6.3-6-3.11,但在你的情况下似乎并不是这样。 你可以检查你的apt提供吗?

 apt-cache show apt | grep "Provides:" 

然后,它说无法下载。 你确定在尝试安装命令之前运行apt-get update吗? 如果您的sources.list之前已经被破坏,然后修复,那么一旦您更新了apt cache,只会考虑这些更改。

你有没有参数尝试过“apt-get -f install”?

从apt-get手册页:

-f,–fix-broken修复; 试图纠正一个系统中的依赖关系错误