I have just switched to a MacBook Pro from windows and the first thing i want to do is get Laravel running :-) so i tried to get composer going.
I installed the composer.phar file and ran it using "php composer.phar" and everything went as expected. So now i want to move the file to a globally accessible area and i am following Jeff's: Laravel 5 fundamentals e01. I tried the mv command as in Jeff's video and i get the following returned:
"mv: rename composer.phar to /usr/local/bin/composer: Not a directory"
i have no clue what is going on because I don't know mac at all yet. Please could someone give me some advice on how to get composer running with a simple "composer" terminal command.
Hey guys I have tried the instructions from the composer site already and this is what i get back in the terminal. And I copied and pasted the code from the composer site, then i tried it with sudo and my password:
Vasheers-MacBook-Pro:~ Vash$ curl -sS https://getcomposer.org/installer | php
#!/usr/bin/env php
All settings correct for using Composer
Downloading...
Composer successfully installed to: /Users/Vash/composer.phar
Use it: php composer.phar
Vasheers-MacBook-Pro:~ Vash$ mv composer.phar /usr/local/bin/composer
mv: rename composer.phar to /usr/local/bin/composer: Not a directory
Vasheers-MacBook-Pro:~ Vash$
so clearly this is something that is not right on my computer, its brand new :-( what can i check? Im brand new to apple so any guidance will be highly appreciated.
A bit more information... i am on El Capitan. I just tried installing composer on a macbook running Yosemite and all is well. I have seen some info about apple's new System Integrity Protector (SIP) which denies any access to some root files. I found a way to disable it so i want to try to switch it off then move composer to the /usr/local/bin and then re-enable it. Will keep you posted.
What about creating another folder somewhere and adding that to the PATH? Is this something that would work or is it not the greatest solution?
ok so its now working. Hopefully this can help someone else who runs into this problem, so here is what i did to fix it:
Reboot in recovery mode: restart you mac and hold down cmd+R.
Open the terminal once recovery mode has started via Utilities->Terminal via the bar at the top.
Type in csrutil disable and hit enter. You should see a msg returned saying that the System Integrity Protection is off.
Restart the computer as normal and then go set up composer. I had to put it in /usr/bin and NOT/usr/local/bin because for some reason it just didn't work there.
Go back to recovery mode and enable System Integrity Protector by typing csrutil enable
Come back in normal boot up and check that composer works. It did for me.
per instruction in this site that if there is a problem moving the file, type the word "sudo" at the very first then the command. Therefore the command will go as