驱动加载错误:insmod: error inserting 'hello.ko': -1 Device or resource busy
2016-11-18 15:36
423 查看
一:insmod时候错误:
1:错误信息insmod: error inserting 'hello.ko': -1 Device or resource busy
2:原因:你的代码里面的设备号和系统已经存在的相冲突
3:查看系统的设备号:
[csharp]
view plain
copy
cat /proc/devices
查看和你的设备号有冲突的吗,注意要分开字符设备和块设备
4:解决,当然是你再换个设备号了。
二:rmmod
0:用rmmod -f也删除不掉的
1:查看当前gcc版本,命令:gcc -v
2:ubuntu默认版本是4.6
3:如果你的不是4.6版本,修改成4.6,在目录/usr/bin下,建立软链接,
我之前的gcc是软链接到gcc-4.4版本了,修改成gcc-4.6版本,如果之前存在gcc的软链接,删除他
4:重新insmod模块,如果提示你模块已经存在,就是说你没修改之前安装的模块,你需要重启电脑,然后再insmod就可以了。
1:错误信息insmod: error inserting 'hello.ko': -1 Device or resource busy
2:原因:你的代码里面的设备号和系统已经存在的相冲突
3:查看系统的设备号:
[csharp]
view plain
copy
cat /proc/devices
查看和你的设备号有冲突的吗,注意要分开字符设备和块设备
4:解决,当然是你再换个设备号了。
二:rmmod
0:用rmmod -f也删除不掉的
1:查看当前gcc版本,命令:gcc -v
2:ubuntu默认版本是4.6
3:如果你的不是4.6版本,修改成4.6,在目录/usr/bin下,建立软链接,
我之前的gcc是软链接到gcc-4.4版本了,修改成gcc-4.6版本,如果之前存在gcc的软链接,删除他
sudo ln -s /usr/bin/gcc-4.6 /usr/bin/gcc
4:重新insmod模块,如果提示你模块已经存在,就是说你没修改之前安装的模块,你需要重启电脑,然后再insmod就可以了。
相关文章推荐
- 错误信息insmod: error inserting 'hello.ko': -1 Device or resource busy
- ubuntu12.04出现ERROR: Removing 'hello': Device or resource busy和insmod: error inserting 'hello.ko': -1 Device or r
- insmod: error inserting 'memdev.ko': -1 Device or resource busy
- 模块插入错误 insmod: can't insert 'memdev.ko': Device or resource busy
- 模块插入错误 insmod: can't insert 'memdev.ko': Device or resource busy
- ubuntu 12.04出现insmod: error inserting 'hello.ko': -1 Device or resource busy的解决办法
- insmod: can't insert 'adc.ko': Device or resource busy:
- LINUX驱动学习:加载模块时出现Device or resource busy的解决方法
- LINUX驱动学习:加载模块时出现Device or resource busy的解决方法
- LINUX驱动学习:加载模块时出现Device or resource busy的解决方法
- insmod: cannot insert 'memdev.ko': Device or resource busy的问题
- 【解决问题】加载驱动模块时Device or resource busy的解决方法
- 重启docker服务器后 遇到 'device or resource busy'错误
- 加载驱动模块时Device or resource busy的解决方法
- ERROR: Removing 'hello': Device or resource busy
- 嵌入式linux插入内核模块Error: could not insert module xxx.ko: Device or resource busy处理
- 进行删除文件操作时碰到错误:open failed: EBUSY (Device or resource busy)
- ubuntu12.04出现ERROR: Removing 'hello': Device or resource busy和insmod: error inserting 'hello.ko': -1 Device or resource busy解决方案
- android 删除文件错误:open failed: EBUSY (Device or resource busy)
- ERROR: Removing 'hello': Device or resource busy