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    查看这个文件就可以看出基本的信息

目录
相关文章
No module named ‘win32file‘
No module named ‘win32file‘
45632 0
|
机器学习/深度学习 Linux
解决ImportError libgmpxx.so.4 cannot open shared object file No such file or directory
解决ImportError libgmpxx.so.4 cannot open shared object file No such file or directory
225 0
解决ImportError libgmpxx.so.4 cannot open shared object file No such file or directory
|
应用服务中间件
./configure *: No such file or directory
今天在CentOS下安装Nginx时,遇到了类似以下的问题: ./configure auto/unix: No such file or directory ./configure auto/options: No such file or directory 之前在另一台服务器上安装的时候也没有遇到此问题, 安装过程参考:CentOS6.5下Nginx1.7.4安装记录 于是网上搜索解决方案,但是搜索了很久也没有找到解决方案, 当我使用“mkdir auto/unix”之后,还是提示类似的错误,但目录名又变了。
3338 0
解决 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‘
297 0
Cannot open shared library libasound_module_conf_pulse.so
Cannot open shared library libasound_module_conf_pulse.so
633 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
732 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)
192 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
242 0
configure: error: Can‘t find ext2fs library
configure: error: Can‘t find ext2fs library
241 0