rmmod: chdir(/lib/modules): No such file or directory 解决方法

简介:

使用rmmod会出现 rmmod : chdir(/lib/modules): No such file or directory ?

 

现在的内核模块在插入卸载时都会要转到 “/lib/modules/内核版本号/ ” 这个目录里。所以只要建立这个目录就行了。

在目标板执行

#mkdir -p /lib/modules/$(uname -r)


较新版本的busybox 1.13.1+ 要卸载模块必须要 “完全匹配模块名”才行,原来在老标本的使用模块文件名就能卸载,现在发现不行了。

# lsmod
mmc_block 9668 0 - Live 0xbf03a000
mmc_core 48000 1 mmc_block, Live 0xbf029000
这里面mmc_block和mmc_core为“完全匹配模块名”,

#rmmod mmc_block

#rmmod mmc_core

而不是mmc_block.ko  mmc_core.ko 这样的模块文件名


这个错误可以利用strace命令来调试,可以很快解决问题。

strace -o log.txt rmmod **

vi  log.txt    查看这个文件就可以看出基本的信息

目录
相关文章
|
5月前
No module named ‘win32file‘
No module named ‘win32file‘
39 0
|
7月前
|
存储 Unix Windows
node_modules 文件夹下 .bin 隐藏文件夹的作用
node_modules 文件夹下 .bin 隐藏文件夹的作用
75 2
|
5月前
解决 Error: ENOENT: no such file or directory, scandir ‘..\node_modules\node-sass\vendor‘
解决 Error: ENOENT: no such file or directory, scandir ‘..\node_modules\node-sass\vendor‘
Cannot open shared library libasound_module_conf_pulse.so
Cannot open shared library libasound_module_conf_pulse.so
487 0
error: Two output files share the same path but have different contents: node_modules\.vite\..xxx.js
error: Two output files share the same path but have different contents: node_modules\.vite\..xxx.js
547 0
error: Two output files share the same path but have different contents: node_modules\.vite\..xxx.js
|
JavaScript
The file is in the program because: Imported via xxx Root file specified for compilation Vetur(1261)
The file is in the program because: Imported via xxx Root file specified for compilation Vetur(1261)
122 0
The file is in the program because: Imported via xxx Root file specified for compilation Vetur(1261)
未解决:lrelease: could not exec ‘/usr/lib/qt5/bin/lrelease‘: No such file or directory
未解决:lrelease: could not exec ‘/usr/lib/qt5/bin/lrelease‘: No such file or directory
137 0
|
开发工具 git
编译pluma:configure.ac:229: error: required file ‘pluma/mate-submodules/Makefile.in‘ not found
编译pluma:configure.ac:229: error: required file ‘pluma/mate-submodules/Makefile.in‘ not found
95 0
configure: error: Can‘t find ext2fs library
configure: error: Can‘t find ext2fs library
178 0
|
iOS开发 MacOS
如何解决npm命令报错Missing write access to /usr/local/lib/node_modules
如何解决npm命令报错Missing write access to /usr/local/lib/node_modules
如何解决npm命令报错Missing write access to /usr/local/lib/node_modules