Open SUSE Linux中编译内核模块报错
最近在OpenSUSE要开发一个内核模块,一开始执行编译时报错:
make[1]: *** /lib/modules/4.12.14-lp151.28.91-default/build/: 没有那个文件或目录。 停止。
看起来是没有内核模块和源码导致的,于是执行了下面的安装:
sudo apt install kernel-source devel_kernel
还是报错,然后又执行一下命令创建了内核目录的软链接:
sudo ln -s /usr/src/uname -r /lib/modules/uname -r/build
执行后,继续报错:
Building modules, stage 2.
MODPOST 0 modules
/bin/sh: scripts/mod/modpost: 没有那个文件或目录
make[2]: *** [scripts/Makefile.modpost:94:__modpost] 错误 127
make[1]: *** [Makefile:1579:modules] 错误 2
然后,再进入到内核目录中 /usr/src/`uname -r` ,执行以下命令:
sudo make oldconfig sudo make prepare
然后,再编译就正常了,记录在这里备忘,也供大家参考。
更新于:1个月前赞一波!2
相关文章
- MySQL5.7 中使用 group by 报错 this is incompatible with sql_mode=only_full_group_by
- linux shell的几种截取字符串的方法
- 微擎安装模块时提示 Failed to connect to we7.rewlkj.com port 80: Timed out
- Linux中date命令如何格式化输出需要的时间格式
- 使用Docker Wine Qemu KVM在Linux运行Windows应用
- Debian Linux国内常用镜像源
- CentOS7安装unzip解压工具命令使用方法
- Linux使用Docker部署.NET6网站图文教程
- linux中Qt工程编译报错: error: 找不到 -lGL
- Linux中通过命令连接指定WiFi
- PHP7.4命令行报错:VC运行库和PHP版本不兼容
- 打开vmware虚拟机报错—该虚拟机似乎正在使用中
- 前端请求PHP接口,报错跨域问题
- 什么是宝塔Linux
- Apache报错:无法使用可靠的服务器域名
- Linux 删除文件或目录 rm 命令
- mysql报错xamp table 'pma__recent' is read only
- 浏览器报错 ERR_SSL_VERSION_OR_CIPHER_MISMATCH
- 怎样在Linux系统 Ubuntu18.04 中安装微信
- C# WebSocket Client在linux连接失败
文章评论
全部评论