Cannot create cache directory .. or directory is not writable. Proceeding without cache in Laravel

前端 未结 7 1810
粉色の甜心
粉色の甜心 2020-12-22 15:07

I created a new Laravel project. When I go to the terminal to install the dependecies composer displays the following warning:

Cannot create cache

7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-22 15:37

    Change the group permission for the folder

    sudo chown -R w3cert /home/w3cert/.composer/cache/repo/https---packagist.org
    

    and the Files folder too

    sudo chown -R w3cert /home/w3cert/.composer/cache/files/
    

    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
    

    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.

    Hope this helps.

提交回复
热议问题