After reading on web, I learned that XAMPP has php-cli pre-installed and it is accessed by /opt/lampp/bin/php
. I installed composer using the following and all went well:
sudo curl -s https://getcomposer.org/installer | /opt/lampp/bin/php
Composer was installed perfectly. After that, I did this to make it global:
sudo mv composer.phar /usr/local/bin/composer
Now I made a folder called "fb" and made following composer.json file :
{"require":{ "facebook/php-sdk-v4":"4.0.*" }}
Now when I type $ composer install
in terminal, following message is displayed:
rohan@sanap:~/Desktop/fb$ composer install
/usr/bin/env: php: No such file or directory
Please help me to use composer. What should I do in following situation?