Cannot create cache directory .. or directory is not writable. Proceeding without cache in Laravel(无法创建缓存目录.. 或目录不可写.在 Laravel 中进行无缓存)
问题描述
我创建了一个新的 Laravel 项目.当我去终端安装依赖时 composer
显示以下警告:
I created a new Laravel project. When I go to the terminal to install the dependecies composer
displays the following warning:
无法创建缓存目录/home/w3cert/.composer/cache/repo/https---packagist.org/,或者目录不可写.继续进行而不使用缓存.
推荐答案
更改文件夹的组权限
sudo chown -R w3cert /home/w3cert/.composer/cache/repo/https---packagist.org
还有 Files 文件夹
and the Files folder too
sudo chown -R w3cert /home/w3cert/.composer/cache/files/
我假设 w3cert 是您的用户名,如果没有将第 4 个参数更改为您的用户名.
I'm assuming w3cert is your username, if not change the 4th parameter to your username.
如果问题仍然存在,请尝试
If the problem still persists try
sudo chown -R w3cert /home/w3cert/.composer
现在,您可能无法创建应用目录,如果发生这种情况,请对您的 html 文件夹或您尝试在其中创建 laravel 项目的文件夹执行相同操作.
Now, there is a chance that you won't be able to create your app directory, if that happens do the same for your html folder or the folder you are trying to create your laravel project in.
这篇关于无法创建缓存目录.. 或目录不可写.在 Laravel 中进行无缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:无法创建缓存目录.. 或目录不可写.在 Laravel 中进行无缓存


基础教程推荐
- php中的PDF导出 2022-01-01
- Web 服务器如何处理请求? 2021-01-01
- 如何在数学上评估像“2-1"这样的字符串?产生“1"? 2022-01-01
- php中的foreach复选框POST 2021-01-01
- php 7.4 在写入变量中的 Twig 问题 2022-01-01
- PHPUnit 的 Selenium 2 文档到底在哪里? 2022-01-01
- 将变量从树枝传递给 js 2022-01-01
- Yii2 - 在运行时设置邮件传输参数 2022-01-01
- 主题化 Drupal 7 的 Ubercart “/cart"页 2021-01-01
- 使用 scandir() 在目录中查找文件夹 (PHP) 2022-01-01