无法卸载模块rmmod: can't change directory to '3.18.0+': No such file or directory 或者/lib/modules

linux设备安装模块后,无法卸载,显示找不到目录 ,网上查了好多资料,都是创建/lib/modules,但是我发现我的设备是有这个目录的,还是不行,那就继续创建了,在/lib/modules目录下创建响应的目录即可

[root@xxx/home]# insmod helloworld.ko 
HELLO WORLD enter!
[root@xxx /home]# rmmod helloworld.ko 
rmmod: can't change directory to '3.18.0+': No such file or directory 
[root@xxx /home]# ls /lib/modules 
4.15.8

安装驱动模块后,卸载该模块时,linux提示没有/lib/modules目录或者3.18.0+
解决方法:没有该目录,则创建它

[root@xxx /home]#mkdir /lib/modules/$(uname -r)
[root@xxx /home]#ls /lib/modules/
3.18.0+  4.15.8

再卸载就可以了。

[root@xxx /home]# rmmod helloworld.ko 
HELLO WORLD exit!
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值