无法找到软件包 linux-header-3.2.46

无法找到软件包 linux-header-3.2.46

Linux-header 包未安装。

root@pc-4:~# apt-cache policy linux-headers-3.2.46
N: Couldn't find any package by regex 'linux-headers-3.2.46'
root@pc-4:~#
root@pc-4:~#

Unable to install packages

root@pc-4:~# apt-get install linux-headers-3.2.46
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-headers-3.2.46
E: Couldn't find any package by regex 'linux-headers-3.2.46'

root@pc-4:~# uname -r
3.2.46
root@pc-4:~# uname -a
Linux pc-4.app.ch-geni-net.em

你能告诉我为什么会出现这个错误信息吗?下面的命令不能解决问题

sudo ln -fs /usr/src/linux-headers-$(uname -r) /lib/modules/$(uname -r)/build

OS: root@pc-4:/home# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.3 LTS
Release: 12.04
Codename: precise
root@pc-4:/home#

它在 emulab.net 虚拟 PC 上运行。

你能帮我解决这个问题吗?

答案1

当然,如果你的列表缓存中没有该包,你就不会拥有该包。通常最简单的方法是使用元包:

apt-cache depends linux-headers-generic
linux-headers-generic
  Depends: linux-headers-3.8.0-31-generic
  Conflicts: linux-headers-generic:i386

或者更好的是,安装同一版本的标题和图像,使用linux generic包:

apt-cache rdepends linux-headers-generic
linux-headers-generic
Reverse Depends:
  linux-generic

apt-cache depends linux-generic
linux-generic
  Depends: linux-image-generic
  Depends: linux-headers-generic

因此,请sudo apt-get update && sudo apt-get install linux-generic重新启动系统以获取系统最新的标题和图像。

相关内容