简体   繁体   English

linux-headers-$(uname -r) 安装程序但 /usr/include/ 未使用新头文件更新

[英]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.

相关问题 当我尝试 gcc make linux-headers-`uname -r` 时,我遇到了错误 - While I'm trying gcc make linux-headers-`uname -r` I'm getting error 如何从/ usr / include中的Linux标头获取函数名称 - How to get functions names from Linux headers located in /usr/include “apt-get install linux-headers-generic”安装在不同于 $(uname-r) 的目录中 - "apt-get install linux-headers-generic" installed in directory different than $(uname-r) 不能在 Linux 上包含 freetype 标头 - Cannot include freetype headers on Linux Linux C:重新定义包含标头中的错误 - Linux C: error of redefinition of in include headers /usr/include linux 中的新 .h 文件 - New .h file in /usr/include linux 如何在Linux上查找Qt包含头文件的位置 - How to find location of Qt include headers on Linux GCC在编译时在/ usr / local / include中查找头文件,但在链接时不查找/ usr / local / lib中的库。为什么? - GCC looks for headers in /usr/local/include when compiling, but not for libraries in /usr/local/lib when linking. Why? 在内核debian中包含objTools(Linux头文件和linux-image) - Include objTools in kernel debians (linux-headers and linux-image) 尽管有if语句,Visual Studio仍试图包括Linux标头 - Visual Studio trying to include linux headers despite if statement
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM