linux - 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
?
解决方案
标头可以在/usr/src
而不是/usr/include
.
因此,您在/usr/include
如果你从经典内核编译模块,你的头文件应该已经安装好了。如果您从自定义内核编译,make headers_install
应该可以解决问题。
推荐阅读
- angular - how to handle view child static error in angular 8
- android - 受限 API 没有响应
- octave - Octave 'wavread' 未定义
- android - ML Kit Firebase 翻译文本 null Kotlin Android
- python - Python:ValueError:无法将字符串转换为浮点数:读取输入文件以应用随机森林时“隔离”
- php - 从 xmlparser 访问 xml 属性
- azure - 带有触发计时器的 Azure Functions 不在监视器下显示日志
- python-3.x - python bdd框架:如何在步骤前后执行代码
- reactjs - this.state 中的额外未定义值
- reactjs - Material UI 分页组件初始视图的数字覆盖默认