The global installation requires sudo privileges .
- To install Composer globally as a system-wide command that will be available for all users, simply place the file in a directory that is in the system PATH . ...
- To install composer locally enter: sudo php composer-setup.php --install-dir=/path/to/project.