[英]linux-headers-$(uname -r) installer but /usr/include/ is not update with new headers
I am trying to develop a Linux Kernel Module, hence I need linux headers.我正在尝试开发 Linux 内核模块,因此我需要 linux 头文件。
I installed the appropriate headers ( linux-headers-4.19.0-10-amd64
) with the following lines, but I do not know how to install them in /usr/include/
我使用以下几行安装了适当的头文件(
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
What is the correct form to update the /usr/include
references ?更新
/usr/include
引用的正确形式是什么?
Headers are to be found in /usr/src
and not /usr/include
.头文件位于
/usr/src
而不是/usr/include
。
Hence, it is not surprising that you don't find any reference to your headers in /usr/include
因此,您在
/usr/include
找不到对您的头文件的任何引用也就不足为奇了
If you compile modules from a classical kernel, your headers should already be installed.如果您从经典内核编译模块,则您的头文件应该已经安装。 If you compile from a custom kernel,
make headers_install
should do the trick.如果您从自定义内核编译,
make headers_install
应该可以解决问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.