Install Composer and configure with XAMPP

Rohan Sanap

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?

Sulthan Allaudeen

Install composer like so:

sudo curl -s https://getcomposer.org/installer | /opt/lampp/bin/php

After installation, you should then symlink it by running command:

sudo ln -s /opt/lampp/bin/php /usr/local/bin/php

Then run the command below to allow the 'composer' command to be run globally (this will be run from within the folder where you've just installed composer in which a composer.phar file has just been created):

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

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related