![无法安装 Debian Stretch 内核标头](https://linux22.com/image/141747/%E6%97%A0%E6%B3%95%E5%AE%89%E8%A3%85%20Debian%20Stretch%20%E5%86%85%E6%A0%B8%E6%A0%87%E5%A4%B4.png)
我在 VPS 和专用服务器上运行 Debian 9 Stretch。我已将向后移植存储库上的两者更新为最新内核apt install linux-image-4.18.0-0.bpo.1-amd64
问题是当我使用安装标头时apt install linux-headers-4.18.0-0.bpo.1-amd64
出现以下错误。
The following packages have unmet dependencies:
linux-headers-4.18.0-0.bpo.1-amd64 : Depends: linux-compiler-gcc-6-x86 (>= 4.14.17-1~) but 4.9.110-3+deb9u6 is to be installed
E: Unable to correct problems, you have held broken packages.
我该如何解决这个问题,为什么在不同的服务器上这对我来说是一个问题?
答案1
您需要告诉apt
使用向后移植来满足标头的依赖关系:
apt install -t stretch-backports linux-headers-4.18.0-0.bpo.1-amd64
我强烈建议安装默认的内核和头文件包:
apt install -t stretch-backports linux-image-amd64 linux-headers-amd64
这将确保您在内核和标头可用时获得更新,即使它们的 ABI 发生变化(以及它们的包名称)。