install cURL in php 7 (ubuntu14.04)

25,928

Solution 1

Try using:

 sudo apt-get install php7.0-curl

Solution 2

Follow these steps:

  1. Install cURL:

sudo apt-get install php-curl OR sudo apt-get install php7.0-curl

  1. Enable cURL extension in php.ini file. ;extension=php_curl.dll Uncomment this.

All done, Cheers!

Share:
25,928
Monal Soft
Author by

Monal Soft

Updated on July 09, 2022

Comments

  • Monal Soft
    Monal Soft almost 2 years

    I have php7 installed on ubuntu 14.04

    I have problems with curl I tried to run composer install and it gives me error Your requirements could not be resolved to an installable set of packages.

    Problem 1 - stripe/stripe-php v2.3.0 requires ext-curl *-> the requested PHP extension curl is missing from your system.

    I also tried sudo apt-get install php-curl. This gives me output:

    E: Unable to locate package php-curl

    Help

  • Quentin
    Quentin almost 8 years
  • Swapnil
    Swapnil almost 8 years
    Tried it on my system: swapnil@HOME:~$ sudo apt-get install php7.0-curl Reading package lists... Done Building dependency tree Reading state information... Done php7.0-curl is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 274 not upgraded.
  • Quentin
    Quentin almost 8 years
    Is your system ubuntu 14.04? It doesn't work for me: evernote.com/l/AAN-9tnP0zdCRIyQw9NuoftWHZgUugQ3Yfc
  • Swapnil
    Swapnil almost 8 years
    DISTRIB_ID=Ubuntu DISTRIB_RELEASE=14.04 DISTRIB_CODENAME=trusty DISTRIB_DESCRIPTION="Ubuntu 14.04.3 LTS"
  • Swapnil
    Swapnil almost 8 years
    Sorry for the text formatting ..can't seem to get it right :)
  • Monal Soft
    Monal Soft almost 8 years
    This command ended up with message: E: Unable to locate package php7.0-curl E: Couldn't find any package by regex 'php7.0-curl'
  • Monal Soft
    Monal Soft almost 8 years
    I get the same output as @Quentin