在用shell脚本进行环境source的时候出现了以下问题:

shell脚本无法进行source。

 

解决:

原因:通过使用一下命令来检查

ls -l `which sh`
  • 会提示如下信息:
lrwxrwxrwx 1 root root 4 Apr 21 13:57 /bin/sh -> dash
  • 说明使用了dash来进行解析的。

改回方法:
执行如下命令:

sudo dpkg-reconfigure dash
  • 然后会提示如下界面:

shell脚本无法进行source。

修改成功,source可以使用。

相关文章:

  • 2021-10-07
  • 2022-12-23
  • 2022-01-29
  • 2022-12-23
  • 2022-01-08
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-04
  • 2022-01-06
  • 2021-10-14
相关资源
相似解决方案