PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, May 20, 2022

[FIXED] How to install Composer on a Mac?

 May 20, 2022     composer-php, laravel, php     No comments   

Issue

I'm trying to get the Laravel PHP framework installed and for that I need to install Composer. However I'm getting stuck there. I installed it before for Symfony but I couldn't get it to work so I think I deleted it.

When I open the terminal on Mac and enter one of the commands for installing composer like:

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

I get:

-bash: php: command not found
curl: (23) Failed writing body (0 != 1635)

Why is this?


Solution

You can install it via Brew.

First, install Brew;

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Then you can use Brew to install Composer;

brew install composer

That's it, it's now installed. You can verify this by running composer --version



Answered By - Mint
Answer Checked By - Terry (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing