Issue
This is the command I run:
composer global require "laravel/installer"
and this is the text and error I got after that:
Changed current directory to /home/dimitar/.composer
./composer.json is not writable.
I'm running Ubuntu 16.04 LTS and PHP 7 and Composer version 1.3.0 and running this command from my home folder.
Solution
Check the owner of composer.json.
ls -lh ~/.composer/composer.json
If it's 'root', run:
sudo chown -R yourusername:yourusername ~/.composer/composer.json
While in the .composer folder, check the 'cache' folder owner. If it's 'root', re-run above command but switch composer.json to the cache. Otherwise, you may end up with a 'Cannot create cache directory' warning.
Answered By - PelleLV Answer Checked By - Robin (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.