Thursday, June 25, 2015

Hello guys if you encounter this fatal error, and you know that you did all the steps and followed those instructions from Stripe documentation and examples, but, still this annoying errors prompted to you?

i encounter this when i try to install Stripe libraries via composer, and the error on the terminal will look like this

when trying to install via composer

php composer.phar install

Loading composer repositories with package information
Installing dependencies (including require-dev)

Your requirements could not be resolved to an installable set of packages.

Problem 1
    - stripe/stripe-php v2.2.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - stripe/stripe-php v2.1.4 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - stripe/stripe-php v2.1.3 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - stripe/stripe-php v2.1.2 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - stripe/stripe-php v2.1.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - stripe/stripe-php v2.1.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - stripe/stripe-php v2.0.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - stripe/stripe-php v2.0.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - Installation request for stripe/stripe-php 2.* -> satisfiable by stripe/stripe-php[v2.0.0, v2.0.1, v2.1.0, v2.1.1, v2.1.2, v2.1.3, v2.1.4, v2.2.0].



Just take a read and understand the error, So, the cause of error is you don't have php5-curl on your box, since my working environment is Ubuntu Linux, we can solve this problem with this command,

sudo apt-get install php5-curl

then,

sudo service apache2 restart

and refresh your browser and cheers your done, type again the composer command

php composer.phar install
Loading composer repositories with package information
Installing dependencies (including require-dev)

  - Installing stripe/stripe-php (v2.2.0)
    Downloading: 100%        

Writing lock file
Generating autoload files





that's all!!! Cheers... ;)

2 comments: