首页 > 解决方案 > linux-headers-$(uname -r) 安装程序,但 /usr/include/ 未使用新标头更新

问题描述

我正在尝试开发一个 Linux 内核模块,因此我需要 linux 头文件。

我用以下几行安装了适当的标题(linux-headers-4.19.0-10-amd64),但我不知道如何将它们安装在/usr/include/

apt-get install -y vim mlocate tree openssh-server gdb libjsoncpp-dev apache2 libmariadbclient-dev libmariadb-dev-compat libmariadb-dev libcunit1-dev libgtk2.0-dev screen python perl sudo dos2unix gperf bison flex pkg-config llvm git sudo build-essential wget fuse cmake makedev  libgl1-mesa-dev  freeglut3-dev  libglu1-mesa-dev
apt-get install -y linux-headers-$(uname -r)
apt-get install -y linux-headers-generic

更新参考文献的正确形式是什么/usr/include

标签: linuxdebiankernelheader

解决方案


标头可以在/usr/src而不是/usr/include.

因此,您在/usr/include

如果你从经典内核编译模块,你的头文件应该已经安装好了。如果您从自定义内核编译,make headers_install应该可以解决问题。


推荐阅读