ubuntu系统下source: not found错误
ubuntu系统下运行含有source命令的Shell脚本时,出现source: not found错误,原因可能是Shell的解释器不是bash,需把Shell的解释器更改为bash。
请按以下步骤更改Shell的解释器:
- 执行
ls -l /bin/sh命令,若得到结果/bin/sh -> dash,则说明Shell的解释器为dash。 - 执行sudo
dpkg-reconfigure dash命令,然后选择no。 - 再次执行
ls -l /bin/sh命令,若得到结果/bin/sh -> bash,则说明成功更改Shell的解释器为bash。
参考链接:如何解决ubuntu系统下source: not found错误?_Alibaba Cloud Toolkit-阿里云帮助中心