你的位置:首页 > Linux系统
CentOS 7.5 最小化安装之后突遇停电,导致系统无法正常启动直接进入修复模式,经过文件系统修复之后系统开机启动。
进系统之后,启动某些服务发现仍然有分区文件损坏,于是想要卸载分区挂载点来修复文件系统,结果执行umount的时候无法卸载,逐执行fuser命令查看是什么进程在占用,结果直接报-bash: fuser: command not found,找不到此命令。
一般这种错误就是系统没有安装相关的包,所以没有这个命令,解决方法很简单,找到这个命令在哪个包里,安装上就可以了,但是麻烦的就是很多命令你不知道是在哪个包里面,还好yum有个功能可以查到某个命令在哪个包里面,使用yum provides ifconfig,yum provides lsof,yum provides fuser等可以查到这个命令的安装包是什么,用起来很方便。
# yum provides fuser Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com psmisc-22.20-15.el7.x86_64 : Utilities for managing processes on your system Repo : base Matched from: Filename : /usr/sbin/fuser psmisc-22.20-15.el7.x86_64 : Utilities for managing processes on your system Repo : @base Matched from: Filename : /usr/sbin/fuser
知道在哪个包里使用yum安装即可。
# yum -y install psmisc Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com base | 3.6 kB 00:00:00 extras | 3.4 kB 00:00:00 updates | 3.4 kB 00:00:00 Resolving Dependencies --> Running transaction check ---> Package psmisc.x86_64 0:22.20-15.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ========================================================================================================================================================= Package Arch Version Repository Size ========================================================================================================================================================= Installing: psmisc x86_64 22.20-15.el7 base 141 k Transaction Summary ========================================================================================================================================================= Install 1 Package Total download size: 141 k Installed size: 475 k Downloading packages: psmisc-22.20-15.el7.x86_64.rpm | 141 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : psmisc-22.20-15.el7.x86_64 1/1 Verifying : psmisc-22.20-15.el7.x86_64 1/1 Installed: psmisc.x86_64 0:22.20-15.el7 Complete!

- 发表评论
- 查看评论
【暂无评论!】发表评论: