Just tried to install composer on my new Macbook Pro. Ran into an issue when I tried to install it globally. I'm not sure if this operating system related or not.
My Steps
sudo php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"sudo php -r "if (hash_file('sha384', 'composer-setup.php') === 'a5c698ffe4b8e849a443b120cd5ba38043260d5c4023dbf93e1558871f1f07f58274fc6f4c93bcfd858c6bd0775cd8d1') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"sudo php composer-setup.phpsudo php -r "unlink('composer-setup.php');"sudo mv composer.phar /usr/local/bin/composer
Problem
I can run composer if I access it directly. php composer.phar works just fine. But I can't get it to work globally by moving it to the /usr/local/bin/composer directory.
Question
Is this operating system related? And if you could shed anymore light onto the issue that would be great.