Could not open input file: /Users/me/composer.phar - After starting source ~ / .bash_profile.save

it gives me a headache. Just trying to install laravel 4.

So, the composer is installed ok and it works correctly. The problem is that when I tried to install laravel I was getting this error:

- laravel/framework v4.2.9 requires php >=5.4.0 -> no matching package found.

      

So, I checked the PHP version the terminal was using and using:

which php

      

gave me the location usr / local / bin and then php -v showed it was 5.3 php.

So, following some instructions, I edited the .bash_profile.save file so that the path is now:

alias composer='php ~/composer.phar'
export PATH=/Applications/MAMP/bin/php/php5.5.14/bin:$PATH
^R

      

Then I ran:

source ~/.bash_profile.save

      

Again, what php.

This showed the correct path, but ... when trying to use composer, I got this error:

Could not open input file: /Users/me/composer.phar

So now I am stuck. Is it because of the composer's line of pseudonym? Where should it be indicated?

Thanks, just want to do laravel ... :)

+3


source to share


2 answers


You need to have composer in this directory below

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



And not in your root user account

+7


source


Just get this composer.phar

from the composer's website and put it in the same place you have it composer.json

; that's all you need.



https://getcomposer.org/download/1.2.0/composer.phar

+1


source







All Articles