Skip to main content

Install Composer on Mac OS High Sierra

Composer is an application-level package manager for the PHP programming language that provides a standard format for managing dependencies of PHP software and required libraries. 

Composer runs through the command line and installs dependencies (e.g. libraries) for an application.

It also allows users to install PHP applications that are available on "Packagist" which is its main repository containing available packages.

Step 1: Go to user directory

cd ~

Step 2: Download composer.

$ curl -sS https://getcomposer.org/installer | php

This will create composer.phar file in same directory.

Step 3: Move composer.phar to /usr/local/bin

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

You may have different directory instead of /usr/local/bin.

Step 4: Create an Alias to run it using composer command

$ alias composer="php /usr/local/bin/composer.phar"
Tags
Submitted by tgoswami on October 8, 2020

Tarun has 11+ years of experience in Quality Assurance in different domains like Banking, E-commerce, Health and Education.

About

At ProgramsBuzz, you can learn, share and grow with millions of techie around the world from different domain like Data Science, Software Development, QA and Digital Marketing. You can ask doubt and get the answer for your queries from our experts.