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

Thursday, January 6, 2022

[FIXED] Trying to Install composer in usr/local/bin on Mac OS X 10.7.5

 January 06, 2022     composer-php, macos     No comments   

Issue

I am trying to get composer set up so I can work with the Laravel framework.

I successful edited my php.ini file, and are correct for installing Composer. I changed directories to bin, by using the following command: cd /bin

Then, in bin, I used the following command to try to install Composer:

curl -sS https://getcomposer.org/installer | php -- --install-dir=bin

but I get the following output:

#!/usr/bin/env php
All setting correct for using Composer
The defined install dir (bin) does not exist

What could be the issue here?

I used echo $PATH to get the following output:

/usr/bin:/bin:/usr/sbin:/usr/local/bin:/usr/X11/bin

so it appears that /usr/local/bin does exist. I'm at a loss. Thank you for your help.


Solution

You shouldn't have to change directories before you run the installation command (and in any case, /bin is quite different from /usr/local/bin). Try this instead:

curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin


Answered By - bdesham
  • 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