我從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:找不到命令