https://blog.csdn.net/buynow123/article/details/51774018
https://www.v2ex.com/t/489371
xxx.sh
#! /bin/sh
source /home/tom/.virtualenvs/py3_flask/bin/activate
錯誤: shell腳本中含有source命令運(yùn)行時提示 source: not found
測試:
運(yùn)行 ls -l /bin/sh 后顯示/bin/sh -> dash
這說明是用dash來進(jìn)行解析的。
解決方案:
命令行執(zhí)行:dpkg-reconfigure dash(需要root權(quán)限)
在界面中選擇no
再運(yùn)行l(wèi)s -l /bin/sh 后顯示/bin/sh -> bash