Skip to content

Instantly share code, notes, and snippets.

@tcelestino
Last active March 1, 2019 12:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tcelestino/8bcf1760858f14824aead301e03eaed3 to your computer and use it in GitHub Desktop.
Save tcelestino/8bcf1760858f14824aead301e03eaed3 to your computer and use it in GitHub Desktop.
how to install composer globally on macOS

Downloading directly from the composer website

Copy and paste that link – https://getcomposer.org/composer.phar – to your browser. It’s always the latest version of Composer.

After getting it, open your terminal to test it. You need just run that command:

php ~/Downloads/composer.phar --version

I assume that you don’t want to write … every time when you need to use a composer. Let’s move it to bin directory.

cp ~/Downloads/composer.phar /usr/local/bin/composer

sudo chmod +x /usr/local/bin/composer

That second command makes your composer executable. Let’s try again, type that command:

composer --version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment