安装composer后,我试图安装larvel,但它给出了ErrorException .please help....
来自composer CMD控制台的数据:-
C:xampphtdocsnew>composer global require "laravel/installer"
Changed current directory to C:/Users/Dell-17/AppData/Roaming/Composer
[ErrorException]
file_put_contents(C:ProgramDataComposerSetupbin): failed to open stream:
Permission denied
require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update]
[--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform
-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-auto
loader] [-a|--classmap-authoritative] [--] [<packages>]...
您需要递归地设置C:ProgramDataComposerSetup
文件夹(包括子目录)的正确权限,以便安装程序可以在其中写入文件。您可以使用一些教程来学习如何做到这一点。
已解决此问题环境变量COMPOSER_HOME应该C:phpcomposer.