Laravel installation error ‘Cannot create cache directory directory is not writable’

Hello guys. A quick laravel installation led me to a brick wall. My command was the normal new laravel application command

composer create-project --prefer-dist laravel/laravel myproject

i got the following error:

Cannot create cache directory /home/myHome/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache.

The reason was that when I installed composer I used $ sudo command because of that the ~/.composer folder was created and owned by the root.

Run this to fix the issue:

$ sudo chown -R $USER $HOME/.composer

Then run the command and YES it runs smoothly.

Install Laravel on Ubuntu 18.04

Searching for the simplest, newest and easiest approach on installing Laravel on my Ubuntu box. So while I was browsing through the net to find the best tutorial it only brought me to a wall of error(s). I met different kind of errors while i was trying to do their step by step instructions. Yet, i was able to drive home to the finish line by assembling different rules set I collected during my experiment. These steps did not yield any error for me, not so far. So I will list down the steps on how to install Laravel on your Ubuntu 18.04 box. Continue reading “Install Laravel on Ubuntu 18.04”

Up ↑

%d bloggers like this: