![“软件包‘linux-headers-3.13.0-27-generic’没有安装候选”](https://linux22.com/image/34500/%E2%80%9C%E8%BD%AF%E4%BB%B6%E5%8C%85%E2%80%98linux-headers-3.13.0-27-generic%E2%80%99%E6%B2%A1%E6%9C%89%E5%AE%89%E8%A3%85%E5%80%99%E9%80%89%E2%80%9D.png)
我正在尝试解决一个问题我在这里发帖。我基本上是想成功运行这个脚本。为此,我相信(而且我很可能是错的)我需要安装该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
使用搜索apt-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
我的系统信息
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
答案1
好吧,从apt-cache search linux-headers
原因来看应该很明显了:
简而言之,该软件包在 Ubuntu 14.10 中不可用。您应该安装linux-headers-3.16.0-24
,linux-headers-3.16.0-25
或者避免所有问题并使用它,linux-headers-generic
这是一个依赖于最新可用内核的元包(根据您在 Ask Ubuntu 中的其他问题,您似乎正在使用 14.10 和 14.04 的内核,这是一个很大的禁忌,也安装该linux-image-generic
软件包,或者更好,linux-generic
这可以确保您拥有最新的可用内核头对,并重新启动系统)。