Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/289.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/bash/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/mercurial/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 通过phing ssh执行bash脚本时出错_Php_Bash_Ssh_Phing_Debconf - Fatal编程技术网

Php 通过phing ssh执行bash脚本时出错

Php 通过phing ssh执行bash脚本时出错,php,bash,ssh,phing,debconf,Php,Bash,Ssh,Phing,Debconf,运行一个通过phing ssh任务安装mysql的脚本,可以得到以下输出: debconf: unable to initialize frontend: Dialog debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.) debconf: falling back to frontend: Readline de

运行一个通过phing ssh任务安装mysql的脚本,可以得到以下输出:

debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin: 
如果我在通过ssh登录后运行相同的脚本,那么它运行时不会出现任何错误:

我认为负责的脚本是(setup.sh):

这只是第一次发生。如果我运行两次脚本,它将完美地执行

Phing任务仅供参考:

 <ssh host="${deploy.host}"
             username="${deploy.user}"
             privkeyfile="${deploy.pem}"
             pubkeyfile="${deploy.pub}"
             command="./setup.sh"
             display="false"
             property="ssh_output"
             failonerror="true"
                />


对话框前端在哑终端上无法工作
说明了一切。安装程序试图弹出一个对话框提示输入一些选项,但无法,因为它不是从交互式终端运行的。@MarcB but
export DEBIAN_FRONTEND=noninteractive
应该告诉它是非交互式的吗?
 <ssh host="${deploy.host}"
             username="${deploy.user}"
             privkeyfile="${deploy.pem}"
             pubkeyfile="${deploy.pub}"
             command="./setup.sh"
             display="false"
             property="ssh_output"
             failonerror="true"
                />