无法创建缓存目录..或目录不可写.在Laravel中继续执行没有缓存的操作 [英] Cannot create cache directory .. or directory is not writable. Proceeding without cache in Laravel
问题描述
我创建了一个新的Laravel项目.当我去终端安装依赖项时,composer
显示以下警告:
I created a new Laravel project. When I go to the terminal to install the dependecies composer
displays the following warning:
Cannot create cache directory /home/w3cert/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache.
推荐答案
更改文件夹的组权限
sudo chown -R w3cert /home/w3cert/.composer/cache/repo/https---packagist.org
和文件"文件夹
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中继续执行没有缓存的操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!