首页 > 解决方案 > 在 debian 9.5 中安装头文件的问题

问题描述

当我尝试使用此命令安装标头时:
apt install linux-headers-$(uname -r)

然后我得到这个输出错误:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-headers-4.9.124-xxxx-std-ipv6-64
E: Couldn't find any package by glob 'linux-headers-4.9.124-xxxx-std-ipv6-64'
E: Couldn't find any package by regex 'linux-headers-4.9.124-xxxx-std-ipv6-64'

我需要这些标头来安装 geoip,而无需执行以下命令:
modprobe xt_geoip

返回此错误:

modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.9.124-xxxx-std-ipv6-64/modules.dep.bin'
modprobe: FATAL: Module xt_geoip not found in directory /lib/modules/4.9.124-xxxx-std-ipv6-64

这是我的sources.list: https://pastebin.com/6eVpTuUD

我的debian版本:

No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 9.5 (stretch)
Release:        9.5
Codename:       stretch

我只想指出我是 linux 的新手,如果这个问题很明显,我很抱歉。我试图在谷歌上找到答案,但我没有设法。

标签: linuxlinux-kernelheaderdebiangeoip

解决方案


推荐阅读