[英]Windows 10 WSL ZipArchive::extractTo(): Permission denied Laravel
I'm trying to install Laravel on WSL. 我正在尝试在WSL上安装Laravel。 I have everything install so far but when I run the laravel command, I get a Permission Denied from ZipArchive.
到目前为止,我已经安装了所有东西,但是当我运行laravel命令时,我从ZipArchive获得了“拒绝权限”。 Is there a way around this?
有没有解决的办法?
Things I've tried: 我尝试过的事情:
Making the file 777 制作文件777
PHP Warning: file_put_contents(/var/www/laravel_*.zip): failed to open stream: Permission denied in /home/jeff/.composer/vendor/laravel/installer/src/NewCommand.php on line 132 PHP Warning: ZipArchive::extractTo(): Permission denied in /home/jeff/.composer/vendor/laravel/installer/src/NewCommand.php on line 150 PHP Warning: ZipArchive::close(): Invalid or uninitialized Zip object in /home/jeff/.composer/vendor/laravel/installer/src/NewCommand.php on line 152 Composer could not find a composer.json file in /var/www To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section Application ready! Build something amazing.
Try to run the bash
as Admin . 尝试以Admin身份运行
bash
。 And use composer create-project --prefer-dist laravel/laravel
to create laravel project than using the global laravel installer
. 与使用全局
laravel installer
相比,使用composer create-project --prefer-dist laravel/laravel
创建laravel项目。
Do try Laragon if you want to develop in windows. 如果要在Windows中开发,请尝试使用Laragon 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.