Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel error when creating new project: proceed without cache

I'm just starting with laravel. I'm following this laravel guide. My environment is an aws server running php 5.6, I have already installed composer. https://laravel.com/docs/5.2/quickstart#deleting-tasks

When I type:

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

I get the following error:

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

How can I fix this? Is this a major problem? If I proceed would I run into trouble after?

Also, is it bad practice to use sudo?

like image 335
Mr Gibbous Avatar asked Feb 01 '16 03:02

Mr Gibbous


1 Answers

When you installed composer pretty sure you used $ sudo command because of that the ~/.composer folder was created by the root.

Run this to fix the issue:

$ sudo chown -R $USER $HOME/.composer
like image 104
Jim M Avatar answered Nov 07 '22 10:11

Jim M