Error putting composer as global MAC

2

I installed the composer on my Mac with this command:

curl -s https://getcomposer.org/installer | php

He downloaded composer.phar and tested:

php compser.phar

I returned everything ok But when I tried to use the command:

sudo mv composer.phar /usr/local/bin/composer

To leave it as global returns me:

mv: rename composer.phar to /usr/local/bin/composer: No such file or directory

How can I solve it? Thanks

UPDATE I read on a topic that we should move the composer like this:

sudo mv composer.phar /usr/bin/composer

But this error:

mv: rename composer.phar to /usr/bin/composer: Operation not permitted
    
asked by anonymous 08.02.2016 / 20:11

1 answer

1

For anyone having this problem, it is necessary to restart their mac and press cmd + r during startup.

Then enter utilities > terminal and enter the following commands:

csrutil disable
reboot 

This is happening because of the Protection of System Integrity. See more information here .

This answer has been translated from SOEN .

    
11.02.2016 / 14:10