无法在 Debian 6 上安装 Linux 头文件

无法在 Debian 6 上安装 Linux 头文件

我不明白为什么这不起作用(我被难住了!);

root@box:/home/user# apt-get install linux-headers-2.6.32-5-686
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:
 linux-headers-2.6.32-5-686 : Depends: gcc-4.3 but it is not going to be installed
E: Broken packages

root@box:/home/user# gcc --version
gcc (Debian 4.7.2-5) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

root@node1:/home/user# uname -a
Linux node1 2.6.32-5-686 #1 SMP Sun May 6 04:01:19 UTC 2012 i686 GNU/Linux
root@node1:/home/user# cat /etc/issue
Debian GNU/Linux 6.0 \n \l

我所做的任何事情都不会安装 gcc-4.3 或 linux-headers 。我对任何想法都持开放态度。

更新

root@box:/home/user# apt-cache policy gcc
apt-cache policy gcc
gcc:
  Installed: 4:4.7.2-1
  Candidate: 4:4.7.2-1
  Version table:
 *** 4:4.7.2-1 0
        100 /var/lib/dpkg/status
     4:4.4.5-1 0
        500 http://ftp.uk.debian.org/debian/ squeeze/main i386 Packages

答案1

看起来好像您的机器上有一组非标准的软件包。您安装的版本gcc来自testing存储库。由于依赖项的更改gcc可能会很长,因此您的计算机上可能还有许多其他来自testing.

您可以尝试以下几件事:

  1. 降级gcc。由于可能存在依赖性,这可能会令人不快。
  2. 确保您尝试安装的linux-headers内核版本是已安装的(使用 进行检查dpkg -l linux-base)。
  3. 不太具体地说明您请求的版本。你可以尝试一下linux-headers-2.6-686

相关内容