Skip to main content
null 💻 notes

How to Build and Install Libcurl

For many server-side projects that are designed to work with outside resources at the command line level, curl is a tool that I often have to use. This is especially true when I am writing programs in C that are designed to be used specifically with internet resources. In this tutorial, I'll show you how to compile, build, and install libcurl on your own machine.

Go ahead and clone the curl repository:

git clone git://

Get everything we possibly need to build curl from scratch:

sudo apt-get build-dep curl

Begin the build process by creating the configuration file:


This will do a bunch of fun things and then you'll want to call the configure script:


Wait for a while while all the checks are made. Since you already installed all the requirements in the build-dep curl command, this should go smoothly.

Finally, let's make this bad boy:


This will do the meat and potatoes compilations. Let this run through and try not to have a seizure while you watch the output. Go get a drink of water or something because it will be a few minutes.

Finally, get all the files transferred to the system directories with the following:

sudo make install

Now you're all set to start using libcurl. Include it in your files with #include<curl/curl.h>.