错误的解释器:.sh脚本上没有这样的文件或目录

时间:2021-02-25 09:11:33

Heres the code that return me a bad interpreter when running from terminal in Linux:

下面是从Linux终端运行时返回错误解释器的代码:

#!/bin/bash

for dir in test/*/
do
./install_module.php $dir
done

sass test/Style/test.scss:themes/ModernAqua/css/test.css --style compressed
echo "Sass styles regenerated"

1 个解决方案

#1


1  

Most probably, your install_module.php has a #! directive for an interpreter that is not installed (or is installed somewhere else.) Locate the php binary (which most probably what this script needs) and correct that directive.

最有可能的是,你的install_module.php有一个#!未安装(或安装在其他地方)的解释器的指令。找到php二进制文件(这很可能是这个脚本需要的)并更正该指令。

Also, by running your outer script with -x parameter to bash will provide more information where exactly the problem is.

此外,通过将带有-x参数的外部脚本运行到bash将提供更准确问题的信息。

#1


1  

Most probably, your install_module.php has a #! directive for an interpreter that is not installed (or is installed somewhere else.) Locate the php binary (which most probably what this script needs) and correct that directive.

最有可能的是,你的install_module.php有一个#!未安装(或安装在其他地方)的解释器的指令。找到php二进制文件(这很可能是这个脚本需要的)并更正该指令。

Also, by running your outer script with -x parameter to bash will provide more information where exactly the problem is.

此外,通过将带有-x参数的外部脚本运行到bash将提供更准确问题的信息。