我从git bash CLI运行php composer.phar install
,它显示sh:php:Command not found。 尽管我已将环境变量路径设置为我的wamp/bin/php/php5.4.16/sh:php:在git bash窗口中找不到命令8
6
A
回答
9
您需要将安装有php.exe的目录放入环境变量PATH中。它通常像C:\ wamp \ bin \ php。
其中\ php \是包含php.exe的目录。
5
- Set php env。如前所述here.变量(可以测试它很容易使用这个命令:
php -r "echo 1;"
或php -v
) - 重启git的外壳
如果composer.phar不存在,运行这个(more info):
php -r "readfile('https://getcomposer.org/installer');" | php
运行
php composer.phar install
终于
运行PHP不git的外壳:
- 找到
C:\wamp\bin\php
- 按住Shift键和右mousebutton点击文件夹
phpX.Y.ZZ
- 选择
Open command prompt window here
- 运行任意PHP命令状
php parameters
-3
无论您使用的是gitbash还是cmd,都应该以管理员身份运行它。导航到您的项目,然后键入命令“作曲家安装”它将工作。我的工作很好。
相关问题
- 1. 在窗口中运行shell时找不到sed命令git bash
- 2. 在Git Bash中找不到javac命令
- 3. 在GIT bash上找不到命令
- 4. 作曲家找不到Git窗口8
- 5. sh.exe“:emacs:命令未找到(Git bash Windows)
- 6. 在git bash中找不到ndk-build命令?
- 7. bash找不到HTK命令
- 8. BASH - 找不到xargs命令
- 9. Windows 8 Git Bash - 命令推 - Putty缓存
- 10. Git Shell - 找不到命令
- 11. -bash命令未找到
- 12. 出口,bash命令没有找到
- 13. 未找到bower命令窗口
- 14. bash __git_ps1命令未找到
- 15. bash命令在新的命令行窗口中运行程序
- 16. bash下的MSBuild:找不到命令
- 17. SH:PHP命令未找到错误从Web浏览器
- 18. “[0:找不到命令”中的Bash
- 19. -bash:反应母语:找不到命令
- 20. 如何仅使用git bash命令弹出窗口? [Windows 10]
- 21. 须藤:端口:找不到命令
- 22. Git的设置(错误: “-bash:混帐:找不到命令”)
- 23. Git命令如“git clone”在Git Bash中不工作
- 24. bash屏幕命令多窗口模式
- 25. NPM -bash命令未找到
- 26. -bash ruby命令未找到
- 27. ls:未找到命令BASH
- 28. 运行窗口命令从bash输出到标准输出?
- 29. IF:找不到命令,窗户在cmd
- 30. Bash shell脚本:f:找不到命令