how to install composer on mac

Open a terminal and navigate to your user directory, ie cd /User/<USER_NAME>/
Run this command shown below to download Composer. This will create a Phar (PHP Archive) file called
composer.phar:

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

Now we move 
composer.phar file to a directory
sudo mv composer.phar /usr/local/bin/

We want to run Composer with having to be root al the time, so we need to change the permissions:
sudo chmod 755 /usr/local/bin/composer.phar
 
Next, we need to let Bash know where to execute Composer: 
nano ~/.bash_profile

Add this line below to bash_profile and save
 
alias composer="php /usr/local/bin/composer.phar"
and then run this command:
 
source ~/.bash_profile
 
Finally, run: 
composer -v

3.5
4
Awgiedawgie 440215 points

                                    php composer-setup.php --install-dir=bin --filename=composer

3.5 (4 Votes)
0
4.25
4
Awgiedawgie 440215 points

                                    /* Step 1 */
install homebrew
/* Step 2 */
brew install composer

4.25 (4 Votes)
0
3.67
3
Awgiedawgie 440215 points

                                    php -r &quot;copy('https://getcomposer.org/installer', 'composer-setup.php');&quot;
php -r &quot;if (hash_file('sha384', 'composer-setup.php') === 'e0012edf3e80b6978849f5eff0d4b4e4c79ff1609dd1e613307e16318854d24ae64f26d17af3ef0bf7cfb710ca74755a') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;&quot;
php composer-setup.php
php -r &quot;unlink('composer-setup.php');&quot;

3.67 (3 Votes)
0
3.8
10
Awgiedawgie 440215 points

                                    brew install composer

3.8 (10 Votes)
0
4.5
2
Phoenix Logan 186120 points

                                    curl -sS https://getcomposer.org/installer | php
php composer.phar install
mv composer.phar /usr/local/bin/composer
open -e  ~/.zshrc
// or open -e  ~/.bash_profile
alias composer=&quot;php /usr/local/bin/composer&quot;

4.5 (2 Votes)
0
Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
composer instal mac 2015 globally mac 2015 install composer globally macos install composer globally composer php macos mac install composer suggests composer on mac install composer mac os mac install composer 1 how to composer in mac how to use composer on mac php instalar composer.phar en mac which composer on mac get composer in mac installer composer mac mac what is my composer version install composer.phar mac install composer macbook macos install composer reinstall composer mac composer mac install installing composer on mac install composer mac command line make composer global mac mac composer setting download composer for mac y how to download composer on mac isntall composer mac how to reinstall composer mac composer install mac directory composer install with php version mac mac os composer re install composer on mac how to install composer2 macos installer composer sur mac download mac composer .composer mac install composer 1 and 2 mac utiliser composer sur mac composer installer mac composer instal mac install composer on a mac install composer 2 in mac composer install on mac os install composer mac comand composer for mac os composer verion on mac' composer mac osx mac composer install locally how to see where composer installed in mac how to install composer in mac os mac os download composer composer on mac os mac osc install composer how to install composer content in mac install composer on mac globally version composer mac Composer how to install on mac install composer in mac globally how to download composer package manager on mac install composer mac mamp macbook install composer 1 php composer install terminal mac how to install composer on mac globally where is composer.phar located mac composer install for mac macos composer instalar composer mac install composer mac os x php composer.phar mac install composer version 1 mac installing composer mac composer free download for mac installing composer in mac composer install globally on mac how to install composer for mac macinstll composer install composer download for mac instalar composer en mac composer global mac composer install correctly mac how to install composer with composer installer on mac why does not installing composer-setup.php on mac instalar composer macos composer mac os install composer.phar mac composer 2 install mac composer install in macos reinstall composer on mac download composer for macos check if you have install composer mac install composer mac terminal mac add composer open composer in mac os composer install command for Mac composer install on mac properly install composer on mac catalina instal composer on mac why do not install composer in my mac which composer command on mac install php composer on mac installing composer globally mac how to install latest composer in mac composer installieren mac composer create project in mac how to install composer on macos composer for mac mac install composer globally download composer for mac os setup composer mac download composer for mac download composer in mac composer commands on mac installer php composer mac mac os install composer install composer globally mac os mac composer version how to update composer on mac version composer install cimposer globally how to install composer 2 mac how to install php composer in mac terminal set up composer windows hopw to set composer path in mac how to check composer version istall composer windows how to install composer php what are the current maintained composer versions install composer on macos insall composer mac which composer my mac use termianl install composer move composer.phar to bin composer global install mac composer.phar use check if composer is installedon mac lubux install comoser php composer.phar -vvv How do I download Composer for Mac? how to use composer.phar install composer globally in path setting up composer update composer globally windows move composer home composer global in php mac os update composer command line installing composer php installer composer global install composer in terminal check version composer what is batter composer or window terminal dwonload composer for mac how to install composer by cmd coposer open in vs terminal install composer 2 in apache composer install terminal install particular composer version composer.phar how use how to install composer linux composer install by cmd brew install composer envirnment variables composer install global macos mac os install composer set environment variable composer install mac os home mac composer location composer mac versio composer download mac version reinstall npm composer mac find global composer composer.phar file windows php composer global install composer directory composer make global mac php composer.php instead of composer install composer.phar to composer use php composer phar composer install global mac os how to install composer in linux cli install composer use composer on windows composer install local windows install composer for windos mac os check if composer installed getcomposer get started composer install specific version manually download composer mac compser install mac know composer version install composer.phar globally how to check composer on mac composer version check win10 composer phar directory linux .composer composer install linux executable terminal start composer.phar insta;; coposer on mac cmd install composer create composer.phar windows composer install get composer version linux install composer globally install composer using cmd run composer install install composer en windows install composer cmd windows instal composer cmd how to install composer in mac terminal composer phar path coposer install mac composer use mac how to composer install how to check composer path install composer global mac install composer dependency on one machine how to globally install composer on mac install composer on server what is composer php installing composer on windows 10 find composer.phar where must composer install be run path to composer.phar install composer terminal mac install composer mac catalina install composer on windows test composer installation composer versions composer windows download linux install composer 2 install composer.phar windows use composer on mac composer instlal cmd install composer to linux composer insetall linux update composer mac download composer mac how to set up composer install composer windeows server install composer on windows 10 composer where to install on mac composer install in centos check if composer is installed mac composer global settings mac composer check cmd composer global packages location instal composer linux install php composer winows composer path mac composer install command in windows install composer command how to get in the composer composer download in linux what is a composer in php adding composer.phar to project how to install a composer composer download windows mac make alias composer installer composer windows install composer spesic versinon install composer php composer instal http request@ composer php conposer install mac run composer install command install composer mac brew composer install php download composer exe add composer to tha path open composer folder in mac terniman ccommand line to install composer composer install using cmd how to install composer in windows check composer install or not composer macos composer installer php composer.phar install mac os x install composer.phar linux globally instal composer mac composer instal mac os path to compser download composer for a project Command 'composer' not found, but can be installed with: how to download composer on windows composer self update version 1 add composer to path mac composer install for windows install composer2 globally mac install composer global how to install getcomposer composer setup for windows how to install composer in windows 7 composer windows get composer mac composer path install composer globaly how to update composer on macos install composer via cmd install composer windows command line how to set up composer in mac os How to use php composer.phar version 2.0 in Laravel composer download mac composer install windows command line composer windows installation php how to install composer whereis composer.phar ubuntu Changed current directory to /Users/arunprasher/.composer mac mv composer.phar /usr/local/bin/composer mac update composer composer command line install windows install composer via composer.phar check composer version in terminal composer location command composer php linux linux get composer /.composer on mac os where is .composer mac terminal composer composer path on mac os where is composer.json global mac where is global composer.json mac how to set up php composer composer install command windows where to install composer install via composer windows run full path composer install linux composer install install composer in windows cmd how find where my composer is located on my mac composer unix php composer install globally command install composer mac composer composer timour mac execute composer.phar how to update composer in windows 10 how to install composer macos composer macos setup composer install cmd mac start composer start composer on mac mac where is composer located composer.phar who needs that composer who needs .phar location composer.phar linux install composer how to get path of composer install macbook install composer install composer cmjn composer for macos composer global linux artIX reinstall conman command line composer install on linux install composer in windows using cmd install composer mscod install composer using composer install composer not globally but for project composer install global mac if i download composer locally can I then move it to bin composer current version install composer for php chevk composer version php composer executable composer which version to install command to install composer composer executable windows php composer.phar install windows install composer v1 on linu how to use Composer with PHPDESKTOP composer php how to check installeed install composer git bash composer.exe location install composer 1 alongside 2 composer install deadmon composer install linux terminal how to install composer locally in windows how to install composer in macbook install specific version of composer how to install composr in directory mac inst all composer composer download latest version mac install composer older version upgrade composer mac os how to upgrade composer mac os how to composer insted of php composer install composer from terminal composer version run cmd how to install composer on mac from terminal Use it: php composer.phar check if composer on mac composer in mac install composer through bash install composer for mac how to know the composer version isntall composer version how to install composer from command cmd how to upgrade composwer on mac install composer version how to install php composer on mac via command line update composer version locally mac move composer to bin composer ~ version osx terminal install composer reinstall composer from cli php mac os x update composer mac os update composer install composer 1 not 2 how to upgrade to composer 2 installl cmposer mac composer for windows composr version check for composer version composer cli set new php7.4 composer version 1 cmd composrer update self with verison 1.9 command for installing composer composer setup mac mac find composer.phar update composer on mac upgrade composer mac composer installation in windows how to use composer linux what is php composer how to download composer php for mac composer.phar location terminal run composer how to show composer image in cmd how to updage composer on mac composer install command in windows not working php composer update windows composer update on mac download composer on mac update composer macos update composer in windows upgrading composer globally on windows updating composer globally on windows mac install .phar mac install phar composer reinstall MAC install composer in macos how to update composer mac using composer on windows composer installation windows composer location composer executable composer command path using composer.phar how to install composer vce composer phar dependency what is composer.phar php composer.phar add path start up composer php install composer global check composer php install composer 2 local windows install composer 2 local composer php server global install compoaser on mac composer.phar file install composer globally macos install composer manually macos install composer manually install composer in windows install composer in mac os composer installation path mac install composer update install composer for windows composer as global cmd windows connect composer to php terminal composer install in windows composer version windows composer as command how to get composer version how to install composer globally where to find composer.phar file composer global instal localhost/composer.phar locahost/composer.phar install composer 2.0 on Mac upgrade composer on Mac composer not installing in mac how to install composer in windows 10 using cmd compooser install mac php composer.phar global config mac os composer how to install latest version download composer with cmd do i have to use composer.phar install composer php mac composer php install mac install composer cmd composer global install compoesr install globlay install composer macosx how to install composer mac os globally composer global installing composer on mac using sudo moving composer on mac how to change composer to globally mac change composer installed from local to global on mac check composer installed or not mac windows composer.phar self-update composer globaly on windows install composer osx composer install mac global where should composer be installed windows mac php composer install composer macos how to run composer php macos windows install php composer zip how to install composer windows composer install locally composer install php location see if composer is installed check if composer is installed composer for linux cmposer install linux how to install composer on windows install global composer how to install composer mac install composer globally in mac where compsoer install php composer.phar install command composer .phar install compoer install windows install composer command line php composer.phar to composer install composer php command line composer install osx install composer composer install windows composer-setup.php install mac how to install composer for windows 10 php composer install on windows composer install linux command composer install linux composer no mac install composer composer installation global golbally install composer composer install in linux install composer windows install using composer where is composer.phar installed install composer on globally mac composer linux shell composer install in mac install composer to directory php composer get composer install location php composure local composer install global how to check if composer is installed how to know if composer is installed on mac mac composer install install composer php macOS what is composer in php composer php in bin mac install composer mac globally How to install composer on mac os install composer on mac os install and run composer via docketfile check the composer version installed in local mac composer global install install composer sur mac terminal windows install compoer globally install composer linux how to install composer on mac composer run install namesco composer install is composer installed install composer from phar install composer with composer.phar install php composer mac get composer.phar file composer.phar install composer iinstall dir add composer to path composer reuqire windows install composer in mac verify composer is installed composer mac os php composer install mac php composer install composer install globally composer install globally mac download lib to current directory composer composr install composer what is it for mac install composer locally how to check composer is installed or not composer linux do i have composer on machine composser install terminal make composer globally mac composer in path composer mac php composer.phar where is compose.phar mac add composer to path composer linux link mac os install composer globally composer install macos composer install on mac install composer globally on mac mac install composer install composer on local and add to path mac os install composer in linux to know version de composer mac version de composer mac where is composer installed windows composer install mac terminal install composer globally mac check composer version windows install composer globally windows install composer Where should I install composer? how to install composer where is composer.phar mac composer install mac where is composer.phar composer.phar install compsoer globally install composer linux mint install composer by terminal windows install composer by terminal installation composer php mac install mavenonmy mac install composer debian trouble installing composer composer install mac os iinstall composer how to install compose composer installation installing composer with git bash vs installing composor in cmd install composer on linux mac setup composer to run as php 7 composer install command composer install where is composer installed install composer ith cmd how to install composer in mac install composer localy composer install on macos install composer globally php composer.phar install install composer mac install composer on mac install composer
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source