cURL is not working in the LAMP droplet

  • Posted on February 4, 2022
  • dexetteAsked by Annette

I created a DigitalOcean LAMP droplet right out of the box - and cURL is not working. I have edited my php.ini file by removing the semicolon before the curl extension, but php is still not recognizing it.

This is incredibly irritating as it should work - right out of the box, yes? I have to have cURL in order to use the CMS I want. I have been trying for days to get this working to no avail.

Either I find a solution quickly or I will just have to find another host that has something that will work. I tried creating my own stack and that didn’t work either. I am about to lose my mind… UGH!

Any help would be appreciated, Thanks!

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

This comment has been deleted

    I uncommented the cURL extension in the php.ini file located in the cli directory and now I get this error message:

    PHP Warning: PHP Startup: Unable to load dynamic library ‘curl’ (tried: /usr/lib/php/20200930/curl (/usr/lib/php/20200930/curl: cannot open shared object file: No such file or directory), /usr/lib/php/20200930/ (/usr/lib/php/20200930/ cannot open shared object file: No such file or directory)) in Unknown on line 0

    Site Moderator
    Site Moderator badge
    September 23, 2022


    I can confirm cURL is working on the LAMP Droplet. I’ve experienced such issues before where the CMS was not using the PHP version I wanted and thus having issues with some extensions.

    Additionally, you can always try and install cURL from your terminal using the following line:


    apt install php-curl


    1. yum install php-curl

    Try DigitalOcean for free

    Click below to sign up and get $200 of credit to try our products over 60 days!

    Sign up

    Featured on Community

    Get our biweekly newsletter

    Sign up for Infrastructure as a Newsletter.

    Hollie's Hub for Good

    Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

    Become a contributor

    Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

    Welcome to the developer cloud

    DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

    Learn more
    DigitalOcean Cloud Control Panel