“包‘linux-headers-3.13.0-27-generic’没有安装候选”

Muh*_*ana 4 apt linux-kernel

我正在尝试解决我在此处发布的问题。我基本上是在尝试成功运行这个脚本。为此,我相信(而且我很可能是错的)我需要安装该linux-headers-3.13.0-27-generic软件包。但是安装命令总是失败

mg@MG-7520SE:~$ sudo apt-get install linux-headers-3.13.0-27-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package linux-headers-3.13.0-27-generic is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'linux-headers-3.13.0-27-generic' has no installation candidate
Run Code Online (Sandbox Code Playgroud)

搜索 usingapt-cache search不会返回有效结果,因为返回的结果都与我需要的版本不匹配,即3.13.0-27

apt-cache search linux-headers
linux-headers-3.16.0-23 - Header files related to Linux kernel version 3.16.0
linux-headers-3.16.0-23-generic - Linux kernel headers for version 3.16.0 on 64 bit x86 SMP
linux-headers-3.16.0-23-lowlatency - Linux kernel headers for version 3.16.0 on 64 bit x86 SMP
linux-headers-generic - Generic Linux kernel headers
linux-headers-lowlatency - lowlatency Linux kernel headers
linux-headers-virtual - Transitional package.
linux-libc-dev - Linux Kernel Headers for development
linux-libc-dev-arm64-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-armel-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-armhf-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-powerpc-cross - Linux Kernel Headers for development (for cross-compiling)
linux-libc-dev-ppc64el-cross - Linux Kernel Headers for development (for cross-compiling)
linux-source-3.16.0 - Linux kernel source for version 3.16.0 with Ubuntu patches
linux-virtual - Minimal Generic Linux kernel and headers
linux-headers-3.4.0-4-goldfish - Linux kernel headers for version 3.4.0 on Android touch emulation
linux-headers-goldfish - Linux kernel headers for the goldfish kernel.
linux-headers-3.16.0-24 - Header files related to Linux kernel version 3.16.0
linux-headers-3.16.0-24-generic - Linux kernel headers for version 3.16.0 on 64 bit x86 SMP
linux-headers-3.16.0-24-lowlatency - Linux kernel headers for version 3.16.0 on 64 bit x86 SMP
linux-headers-3.16.0-25 - Header files related to Linux kernel version 3.16.0
linux-headers-3.16.0-25-generic - Linux kernel headers for version 3.16.0 on 64 bit x86 SMP
linux-headers-3.16.0-25-lowlatency - Linux kernel headers for version 3.16.0 on 64 bit x86 SMP
Run Code Online (Sandbox Code Playgroud)

我的系统信息

mg@MG-7520SE:~$ uname -a
Linux MG-7520SE 3.13.0-27-generic #50-Ubuntu SMP Thu May 15 18:06:16 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
mg@MG-7520SE:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.10
Release:    14.10
Codename:   utopic
Run Code Online (Sandbox Code Playgroud)

Bra*_*iam 8

那么,从apt-cache search linux-headers原因来看应该是显而易见的:

简而言之,该软件包在 Ubuntu 14.10 中不可用。您应该改为安装linux-headers-3.16.0-24linux-headers-3.16.0-25或者避免所有问题,并使用linux-headers-genericwhich 是一个依赖于最新可用内核的元包(根据您在 Ask Ubuntu 中的另一个问题,您似乎使用 14.10 和 14.04 的内核,这是一个很大的禁忌,也安装linux-image-generic软件包,或者更好,linux-generic这可以确保您拥有最新的可用内核头对,然后重新启动系统)。