安装 linux 头文件的命令失败

ptr*_*cao 5 command-line kernel debian header-file

我需要为 Nvidia 驱动程序安装我的 linux 头文件。但是这样做时出现错误:

peter@peter-deb:~$ sudo apt-get install linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package linux-headers-2.6.32-5-amd64
E: Couldn't find any package by regex 'linux-headers-2.6.32-5-amd64'
Run Code Online (Sandbox Code Playgroud)

我怎样才能让它发挥作用?

编辑:我正在使用 Deb 6。

@沃伦杨:

peter@peter-deb:~$ sudo apt-get install -qy linux-headers-$(uname -r)
[sudo] password for peter: 
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package linux-headers-2.6.32-5-amd64
E: Couldn't find any package by regex 'linux-headers-2.6.32-5-amd64'
Run Code Online (Sandbox Code Playgroud)

并且

peter@peter-deb:~$ apt-cache search linux-headers
linux-headers-3.0.0-1-all - All header files for Linux 3.0.0 (meta-package)
linux-headers-3.0.0-1-all-amd64 - All header files for Linux 3.0.0 (meta-package)
linux-headers-3.0.0-1-amd64 - Header files for Linux 3.0.0-1-amd64
linux-headers-3.0.0-1-common - Common header files for Linux 3.0.0-1
linux-headers-3.0.0-1-common-rt - Common header files for Linux 3.0.0-1-rt
linux-headers-3.0.0-1-rt-amd64 - Header files for Linux 3.0.0-1-rt-amd64
linux-headers-2.6-amd64 - Header files for Linux amd64 configuration (dummy package)
linux-headers-2.6-rt-amd64 - Header files for Linux rt-amd64 configuration (dummy package)
linux-headers-amd64 - Header files for Linux amd64 configuration (meta-package)
linux-headers-rt-amd64 - Header files for Linux rt-amd64 configuration (meta-package)
Run Code Online (Sandbox Code Playgroud)

和sources.list:

# Debian packages for testing
deb http://mirror.transact.net.au/debian/ testing main contrib non-free
# Uncomment the deb-src line if you want 'apt-get source'
# to work with most packages.
# deb-src http://mirror.transact.net.au/debian/ testing main contrib non-free

# Security updates for stable
# deb http://security.debian.org/ stable/updates main contrib non-free
Run Code Online (Sandbox Code Playgroud)

另请注意,我 apt-get 已更新,这没有任何区别。

War*_*ung 8

Ubuntu 不提供特定于 AMD64 的内核头文件包。

你可能想要的是linux-headers-2.6.32-5-generic. 这结合了 32 位和 64 位 Intel x86 CPU 变体的 Linux 标头。

说apt-cache search linux-headers看看你的其他选择。