How to Fix: Could not find CURL error in Ubuntu and Other Linux
Here’s how you can fix the “could not find CURL” error in Debian, Ubuntu, Fedora and Arch Linux.
CURL is a free and open-source library that helps retrieve and extract information from an URL over various protocols. It is a handy module and is used in thousands of applications.
It consists of libcurl library, which supports almost all modern web communication protocols. The command line version is curl
.
If curl is not installed in your system, you may get the following error when compiling any program from source in Linux distributions.
Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR) on ...
How to Fix: Could not find CURL error
To fix this error, you need to install several packages. They are distribution specific.
- Open a terminal window and install the following for Debian, Ubuntu and related distributions. The
libssl-dev
is needed for the common HTTPS protocol used today.
sudo apt-get install curl libssl-dev libcurl4-openssl-dev
- For Fedora, CentOS, RHEL, and related distro use the below:
sudo dnf install curl libcurl-devel
- And for Arch Linux, Manjaro use the following.
sudo pacman -S --needed curl libcurl-compat
After you install the above packages, try to run the command which caused this error. And you should be all set.
Please let me know if you face any errors in the comment box below.