我需要安装 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'
我怎样才能让它发挥作用?
编辑:我正在使用 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'
并且
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)
和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
另请注意,我 apt-get update 这没有什么区别。
答案1
Ubuntu 不提供 AMD64 特定的内核头文件包。
您可能想要的是linux-headers-2.6.32-5-generic
.这结合了 32 位和 64 位 Intel x86 CPU 变体的 Linux 头文件。
说apt-cache search linux-headers
看看你的其他选择。
答案2
只需输入:
$ apt-cache search linux-headers
并选择任何linux-headers
像我的选择:
linux-headers-3.14-kali1-amd64
并使用以下命令安装它:
$ sudo apt-get install linux-headers-3.14-kali1-amd64
这对我有用。