出现Command ‘locate’ not found,but can be installed with:apt install mlocate解决方法
在使用Ubuntn出现Command ‘locate’ not found,but can be installed with:apt install mlocate是因为没有安装
解决步骤:
1.切换root用户(如果有root用户可以直接su root)
1.1设置密码
sudo passwd root
1.2需要输入两次密码
1.3切换root 用户
su root
2.安装locate
2.1更新可用软件包列表
sudo apt update
2.2安装locate
apt install mlocate
2.3需要更新索引库
updatedb
3.如果想要切换回原来的用户
su 用户名