gpt4 book ai didi

php - Windows 10 WSL ZipArchive::extractTo(): 权限被拒绝 Laravel

转载 作者:太空宇宙 更新时间:2023-11-04 12:41:32 25 4
gpt4 key购买 nike

我正在尝试在 WSL 上安装 Laravel。到目前为止,我已经安装了所有东西,但是当我运行 laravel 命令时,我从 ZipArchive 得到了一个 Permission Denied。有解决办法吗?

我尝试过的事情:

  • 目录是 777 -r
  • 目录所有者对我的用户和 www 数据有误
  • 制作文件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.

最佳答案

尝试以 Admin 身份运行 bash。并使用 composer create-project --prefer-dist laravel/laravel 来创建 laravel 项目,而不是使用全局 laravel 安装程序

如果你想在 windows 中开发,请尝试 Laragon

关于php - Windows 10 WSL ZipArchive::extractTo(): 权限被拒绝 Laravel,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40033728/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com