Try installing curl with the dev libraries:

sudo apt update &&
sudo apt upgrade &&
sudo apt install curl libcurl4-openssl-dev
Answer from Josh on Stack Overflow
Top answer
1 of 2
19

The names of the packages for programs and libraries in Debian (and Raspbian) are standardized, and sometimes differ from the names the libraries give themselves or the tag or symbol names for them.

You should search for "curl" on the package system, and you will find the curl-related libraries, which might be what you want.

Packages ending with a "-dev" are the ones you usually need when you want to have something compiled, they will install the includes and other files needed for that.

Try a:

apt-cache search curl

To find out all the packages with "curl" in the package name.

You are probably looking for one of these:

libcurl3 - easy-to-use client-side URL transfer library (OpenSSL flavour)

libcurl3-dbg - debugging symbols for libcurl (OpenSSL, GnuTLS and NSS flavours)

libcurl3-gnutls - easy-to-use client-side URL transfer library (GnuTLS flavour)

libcurl3-nss - easy-to-use client-side URL transfer library (NSS flavour)

libcurl4-gnutls-dev - development files and documentation for libcurl (GnuTLS flavour)

libcurl4-nss-dev - development files and documentation for libcurl (NSS flavour)

libcurl4-openssl-dev - development files and documentation for libcurl (OpenSSL flavour)

I would try to get the last one, the openssl-dev.

apt-get install libcurl4-openssl-dev

And then try to compile the software again. If that doesn't work, try to install the "libcurl3" as a second option.

2 of 2
0

I had a similar problem. To make it short:

Ubuntu:

sudo apt-get install libcurl4-openssl-dev 

CentOS:

sudo yum install libcurl-devel 
Discussions

find_package: Could NOT find CURL
I have installed vcpkg in classic (not manifest) mode, in C:\VCPKG, and run vcpkg install curl. CMake cannot find the package, ostensiblu because it doesn't find the library: PS E:\cmake> cm... More on github.com
🌐 github.com
8
November 14, 2022
Compile bug: Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR) - Fedora 42 - building using CUDA
Git commit Most recent; I ran git pull before attempting to build. Operating systems Linux GGML backends CUDA Problem description & steps to reproduce ~/GitHub/llama.cpp(master)$ cmake -B build -DG... More on github.com
🌐 github.com
4
November 18, 2025
curl not found
The only thing that can cause this is that php isn’t configured to load curl. I have not used windows since 2013 so I know nothing about specifics of php+windows. PHP on the command line can be different than its web counterpart. Sometimes it uses a different ini file. Phpinfo from the webserver will tell you which file it is using. That’s likely where your problem is. More on reddit.com
🌐 r/PHPhelp
11
2
April 15, 2024
CMake with ENABLE_DATE_TESTING=ON fails with error "Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR)"
-DENABLE_DATE_TESTING=ON -- The ... TRUE CMake Error at /usr/local/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message): Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR) Call Stack (most recent call first): /usr/local/share/cmake-3.16/Mod... More on github.com
🌐 github.com
3
February 23, 2020
🌐
DebugPoint
debugpoint.com › home › tutorials › how to fix: could not find curl error in ubuntu and other linux
[Fixed] Could not find CURL error in Ubuntu and Other Linux
February 11, 2023 - 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 ...
🌐
GitHub
github.com › microsoft › vcpkg › issues › 27812
find_package: Could NOT find CURL · Issue #27812 · microsoft/vcpkg
November 14, 2022 - I have installed vcpkg in classic (not manifest) mode, in C:\VCPKG, and run vcpkg install curl. CMake cannot find the package, ostensiblu because it doesn't find the library: PS E:\cmake> cmake . -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scrips/buildsystems/vcpkg.cmake -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043. CMake Error at C:/Program Files/CMake/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR) Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) C:/Program Files/CMake/share/cmake-3.24/Modules/FindCURL.cmake:181 (find_package_handle_standard_args) CMakeLists.txt:4 (find_package) -- Configuring incomplete, errors occurred!
Author   microsoft
🌐
TecMint
tecmint.com › home › linux commands › how to fix “bash: curl: command not found” error
How to Fix "bash: curl: command not found” on Linux
February 28, 2024 - The most common reason for this error is that ‘curl‘ is not installed on your Linux system.
🌐
GitHub
github.com › ggml-org › llama.cpp › issues › 17372
Compile bug: Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR) - Fedora 42 - building using CUDA · Issue #17372 · ggml-org/llama.cpp
November 18, 2025 - Compile bug: Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR) - Fedora 42 - building using CUDA#17372
Author   ggml-org
🌐
Reddit
reddit.com › r/phphelp › curl not found
r/PHPhelp on Reddit: curl not found
April 15, 2024 -

Hi,

I hope someone can help me with this. I am pretty stumped and tried everything.

Versions:

PHP: 8.2.18 TS (Treid the NTS version)

Apache: 2.4.51

Wampserver: 3.2.6 64bit

Windows 10 64bit

I am having an issue where I get the following message

PHP Warning: PHP Startup: Unable to load dynamic library 'curl'

  • When I view my localhost it curl isn't on the list

  • When I type in the cmd php -m it states curl is there.

  • In the tray for wamp, under php extensions curl is ticked

  • When I run phpinfo() Curl isn't picked up

I have tried the following solutions to resolve issue

  1. Paste path to my php into the environment variables. this solved the issue for me on 8.2.9

  2. I tried this last week. Thought I would delete it and try again but same results

Only things I can think of is updating my wamp to latest. but this is a company laptop so I don't want to do something that will probably have me taking the machine to IT or upgrading it resulting in me have to reconfigure all my settings. I would do this but I want to know I exhasuted all my options before I take this step.

Yes the extension has been uncommented in the ini file.

let me know if you require more info

Thank you

🌐
GitHub
github.com › HowardHinnant › date › issues › 546
CMake with ENABLE_DATE_TESTING=ON fails with error "Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR)" · Issue #546 · HowardHinnant/date
February 23, 2020 - -DENABLE_DATE_TESTING=ON -- The ... TRUE CMake Error at /usr/local/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message): Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR) Call Stack (most recent call first): /usr/local/share/cmake-3.16/Mod...
Author   HowardHinnant
Find elsewhere
🌐
GitHub
github.com › alexa › avs-device-sdk › issues › 579
Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR) · Issue #579 · alexa/avs-device-sdk
March 25, 2018 - CMake Error at /usr/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:138 (message): Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR) (Required is at least version "7.43.0") Call Stack (most recent call first): /usr/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-3.7/Modules/FindCURL.cmake:50 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) AVSCommon/CMakeLists.txt:3 (find_package)
Author   alexa
🌐
Command Linux
commandlinux.com › home › how to › how to fix ‘curl: command not found’ error on linux systems
How to Fix 'curl: command not found' Error on Linux Systems
March 27, 2026 - Run curl --version in your terminal. If curl exists, it displays version information and supported features. An error message means curl is missing or not in your PATH. You can also use which curl to find the installation location.
🌐
Reddit
reddit.com › r/cpp_questions › why is curl.h not getting recognized even though ive added in the library ?
r/cpp_questions on Reddit: why is curl.h not getting recognized even though ive added in the library ?
February 26, 2023 -

edit: couldnt edit the title but i was basically trying to say why is my code still not compiling even though ive added in the libraries (at least to my knowledge )

starting to play with some APIs in C++ and i have this code right here:

    #include <iostream>
    #include <string>
    #include <stdio.h>
    #include <curl/curl.h>
    
    using namespace std;
    
    int main() {
    	CURL* hnd = curl_easy_init();
    
    	curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
    	curl_easy_setopt(hnd, CURLOPT_URL, "https://coinranking1.p.rapidapi.com/coins?referenceCurrencyUuid=yhjMzLPhuIDl&timePeriod=24h&tiers%5B0%5D=1&orderBy=marketCap&orderDirection=desc&limit=50&offset=0");
    
    	struct curl_slist* headers = NULL;
    	headers = curl_slist_append(headers, "X-RapidAPI-Key: f9feab3ecfmsh6581fgfd78gfd8p175b11jsn324272c6a0fa");
    	headers = curl_slist_append(headers, "X-RapidAPI-Host: coinranking1.p.rapidapi.com");
    	curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
    
    	CURLcode ret = curl_easy_perform(hnd);
    }

and originally when i tried to compile my code, the problem that i was having was at curl/curl.h.

so i did the following:

  1. downloaded curl.h via this link:

    1. https://curl.se/download.html

  2. downloaded the .zip file

  3. extracted the .zip file

  4. navigated to the include file

  5. opened up properties

    1. https://imgur.com/a/3vzTOJw

  6. went to "additional include directories"

    1. https://imgur.com/a/COSY8cf

  7. clicked okay

  8. tried rerunning

  9. and got the error message :

    1. cannot open inclue file curl/curl.h files

this is what my filepath looksl ike for my include file :https://imgur.com/a/GGfpGRz

and to confirm these are how my "additional include directories" look like: https://imgur.com/a/C0Et2dq

🌐
CMake Discourse
discourse.cmake.org › usage
Problem with findpackage(CURL REQUIRED) and precompiled curl 7.68.0 for Windows - Usage - CMake Discourse
February 23, 2020 - Hi, I am using CMake 3.16.3 and having problems with the provided FindCurl.cmake script. I have unzipped the precompiled version downloaded from the curl website in a given location and set both CMAKE_PREFIX_PATH and CMAKE_MODULE_PATH to that location. CMake can locate the version and header files just fine, but fails with the library: Could NOT find CURL (missing: CURL_LIBRARY) (found version "7.68.0") I think it might be due to the fact that the precompiled package contains libcurl.a and l...
🌐
GitHub
github.com › AppImage › AppImageUpdate › issues › 210
"Could NOT find CURL (missing: HTTP)" while building on Ubuntu 14 · Issue #210 · AppImageCommunity/AppImageUpdate
September 17, 2022 - And when I try to change build options it does not work. Is there any dependencies I need to install or options I need to set to build this library? It would be nice if you set up a "build" section in your README. -- C++ Requests CMake Options -- ======================================================= -- CPR_GENERATE_COVERAGE: OFF -- CPR_CURL_NOSIGNAL: OFF -- CPR_USE_SYSTEM_GTEST: OFF -- CPR_FORCE_USE_SYSTEM_CURL: ON -- CPR_ENABLE_SSL: ON -- CPR_FORCE_OPENSSL_BACKEND: OFF -- CPR_FORCE_WINSSL_BACKEND: OFF -- CPR_FORCE_DARWINSSL_BACKEND: OFF -- CPR_FORCE_MBEDTLS_BACKEND: OFF -- CPR_ENABLE_LINTING: OFF -- CPR_ENABLE_CPPCHECK: OFF -- CPR_BUILD_TESTS: OFF -- CPR_BUILD_TESTS_SSL: OFF -- ======================================================= -- Automatically detecting SSL backend.
Author   AppImageCommunity
🌐
nixCraft
cyberciti.biz › nixcraft › howto › ubuntu linux › how to install curl command on ubuntu linux
How to install curl command on Ubuntu Linux - nixCraft
May 1, 2024 - I am a new Ubuntu Linux user. I switched from Apple MacOS/Macbook and I am trying to run the curl command from a shell script but getting the following error: bash: curl: command not found How do I fix this on an Ubuntu Linux version 17.10/19.04/20.10/16.04/18.04/20.04/22.04 and 24.04 LTS?
🌐
Linux Mint Forums
forums.linuxmint.com › board index › main edition support › other topics
Cmake not finding curl - Linux Mint Forums
Whenever I run the command 'sudo ./filename.sh' while I am running a change directory command, I get this error message: CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find CURL (missing: CURL_INCLUDE_DIR) Call Stack (most recent call ...