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

Viewed 158963

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.

4 Answers

Change ownership of your .composer directory:

sudo chown -R $USER $HOME/.composer

$USER is your username and $HOME is your home directory.

Use this command:

sudo chown -R $USER ~/.composer/
Related