Run the below commands inside the Terminal: Step 1. sudo php -r "copy('https://getcomposer.org/installer','composer-setup.php');" Step 2. php composer-setup.php Step 3. sudo mv composer.phar /usr/local/bin/composer