php – Composer安装错误 – 输出不是tty,输入不是tty
| 
                         
 我正在尝试通过php安装composer,如他们的wesite所述. 
  
  
  
php -r "readfile('https://getcomposer.org/installer');" | php 
 但它显示以下错误: $php -r "readfile('https://getcomposer.org/installer');" | php
output is not a tty
input is not a tty 
 我在Windows 7中并使用git bash来执行此命令.在Windows命令提示符下,它工作正常.只有从git bash 2.6.2-64bit运行此命令时才会出现此问题. 顺便说一下,我已经为windows安装了composer,这很好用.但我无法以这种方式下载composer.phar.我该如何解决这个问题? 
 它可以是PATH或编码问题: 
  
                          > issue 25提到: 
 > issue 519甚至建议unalias winpty unalias $(alias | grep winpty | cut -d"=" -f1 | cut -d" " -f2) 但: 
 所以现在,bash控制台与通过管道执行php不兼容(因为第二个| php可能无法从winpty中受益,这在程序需要Win32控制台进行交互式使用时似乎需要). Peh指出in the comments: 
 这可能是因为bash.exe不使用winpty,与git-bash.exe相反. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!  | 
                  
