几篇文章整合,终于成功
引用链接
使用source命令的时候提示source: command not found错误解决
source 命令找不到的情况(修改完/etc/profile文件之后,使其生效)
locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory
解决办法:
source: command not found。
方法:使用root用户:sudo su 或者sudo -s
此时继续报错
修改完成/etc/profile,使其生效
source /etc/profile 报错source: command not found。-提示找不到命令
方法: locate source /etc/profile
此时报错 locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory
方法:执行updatedb 等待几秒后 再次执行source /etc/profile
执行成功