I\'ve followed the guide on installing composer globally from the composer site: https://getcomposer.org/doc/00-intro.md#globally
The problem is I have to use sudo e
Figured out the problem.
1) I either had to clear out the cache in /home/lamp/.composer or change the owner of this
/home/lamp/.composer
2) And change the owner of /usr/local/bin/composer
/usr/local/bin/composer
After doing these 2 changes I can now run composer commands without using sudo.
sudo