安装composer之后,我尝试安装larvel,但它提供了ErrorException。请帮助....
来自composer cmd控制台的数据: -
C:\xampp\htdocs\new>composer global require "laravel/installer"
Changed current directory to C:/Users/Dell-17/AppData/Roaming/Composer
[ErrorException]
file_put_contents(C:\ProgramData\ComposerSetup\bin): 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>]...
答案 0 :(得分:0)
您需要递归设置C:\ProgramData\ComposerSetup\
文件夹的正确权限(包括子目录),以便安装程序可以在其中写入文件。您可以使用some tutorial了解如何执行此操作。
答案 1 :(得分:0)
解决了这个问题环境变量COMPOSER_HOME应该是C:\ php \ composer。