jjzjj

php - sudo composer install 与 composer install

我运行sudocomposerinstall我收到了这个警告DonotrunComposerasroot/superuser!Seehttps://getcomposer.org/rootfordetails我只是尝试了composerinstall我得到了这个错误[ErrorException]file_put_contents(/Applications/MAMP/htdocs/code/bheng/vendor/composer/installed.json):failedtoopenstream:Permissiondenied这是我的Laravel文件夹的当前权限集total

php - file_put_contents(.../bootstrap/cache/services.json) : failed to open stream: No such file or directory

我在运行任何phpartisan命令时一直收到此错误。[ErrorException]file_put_contents(/Applications/MAMP/htdocs/code/bheng/md-bheng/bootstrap/cache/services.json):failedtoopenstream:Nosuchfileordirectory我该如何阻止它? 最佳答案 编辑-如果services.json文件不存在,运行phpartisanserve然后停止强制创建文件。请参阅:laravelservices.jsonn