错误: shell脚本中含有source命令运行时提示 source: not found
测试:
运行 ls -l /bin/sh 后显示/bin/sh -> dash
这说明是用dash来进行解析的。
解决方案:
命令行执行:dpkg-reconfigure dash(需要root权限)
在界面中选择no
再运行ls -l /bin/sh 后显示/bin/sh -> bash
最后测试shell脚本,可以正常使用!
错误: shell脚本中含有source命令运行时提示 source: not found
测试:
运行 ls -l /bin/sh 后显示/bin/sh -> dash
这说明是用dash来进行解析的。
解决方案:
命令行执行:dpkg-reconfigure dash(需要root权限)
在界面中选择no
再运行ls -l /bin/sh 后显示/bin/sh -> bash
最后测试shell脚本,可以正常使用!
清理缓存
Ubuntu解决sudo: source: command not found错误作者:chszs,
错误描述:运行shell脚本,报错误test.sh: 4: test.sh: let: not found解决办法:It's because Ubuntu uses the dan if
shell脚本报let not found错,根本原因是dash与bash解析的区别,那么dash和bash又是什么呢?
从接口对接到消息发送的全过程。
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M