sudo apt-get install curl-devel

sudo apt-get install libcurl-dev

(will install the default alternative)

OR

sudo apt-get install libcurl4-openssl-dev

(the OpenSSL variant)

OR

sudo apt-get install libcurl4-gnutls-dev

(the gnutls variant)

Answer from n.m.is-an-unemployed-ai-agent on Stack Overflow
🌐
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

Discussions

fatal error: curl/curl.h: No such file or directory
This is more a remark, than a real bug, but is CMake not supposed to check if curl is present on the system? Because I did not install it and got this error fatal error: curl/curl.h: No such file o... More on github.com
🌐 github.com
1
June 16, 2019
ubuntu - json.cpp:474:23: fatal error: curl/curl.h: No such file or directory - Unix & Linux Stack Exchange
I am trying to compile ChatScript but I get this error message: json.cpp:474:23: fatal error: curl/curl.h: No such file or directory When I try apt-get install curl it says: curl is already the More on unix.stackexchange.com
🌐 unix.stackexchange.com
May 12, 2018
c - Ubuntu - #include <curl/curl.h> no such file or directory - Stack Overflow
I'm developping a C-program using Curl on Ubuntu. I'm using Eclipse Kepler. I have installed the curl library using apt-get install libcurl4-gnutls-dev And I checked if everything is allright usi... More on stackoverflow.com
🌐 stackoverflow.com
[Error] curl/curl.h: No such file or directory
You need to make sure the curl include dir is in your include path. The specific way you do that is going to depend on your compiler and build system. More on reddit.com
🌐 r/learnprogramming
6
1
June 1, 2024
🌐
GitHub
github.com › tangrams › tangram-es › issues › 2069
fatal error: curl/curl.h: No such file or directory · Issue #2069 · tangrams/tangram-es
June 16, 2019 - This is more a remark, than a real bug, but is CMake not supposed to check if curl is present on the system? Because I did not install it and got this error fatal error: curl/curl.h: No such file or directory The fix is only apt-get inst...
Author   tangrams
🌐
Lynxbee
lynxbee.com › home › how to resolve : " fatal error: curl/curl.h: no such file or directory " for ubuntu linux
How to resolve : ” fatal error: curl/curl.h: No such file or directory ” for Ubuntu Linux
June 10, 2022 - Now, if you use such header and tried to compile on Ubuntu, you may see an error like “fatal error: curl/curl.h: No such file or directory” . In such case, use below command as solution to install missing development headers dependency for Ubuntu. ... Where, ibcurl4-nss-dev is described as “development files and documentation for libcurl (OpenSSL flavour)” · If you can’t install common Bioconductor packages and see the error “____ dependency is not available” the above might solve your issue.
Find elsewhere
🌐
Candid
candid.technology › fatal-error-curl-curl-h-no-such-file-or-directory
Fix: Fatal error: curl/curl.h: no such file or directory
January 6, 2023 - The error is mainly caused by a missing Curl installation or dependency that causes your script to terminate as soon as you import any related libraries. The resolution is also rather easy; you need to figure out which variant of Curl you need ...
🌐
Brainly
brainly.com › computers and technology › high school › ```plaintext fatal error: curl/curl.h: no such file or directory ```
[FREE] plaintext fatal error: curl/curl.h: No such file or directory - brainly.com
November 19, 2023 - The error "fatal error: curl/curl.h: ... cannot find the header file curl.h. This usually means that the libcurl development package is not installed on your system....
🌐
GitHub
github.com › curl › curl › blob › master › include › curl › curl.h
curl/include/curl/curl.h at master · curl/curl
CURLE_REMOTE_FILE_NOT_FOUND, /* 78 - remote file not found */ CURLE_SSH, /* 79 - error from the SSH layer, somewhat · generic so the error message is of · interest when this has happened */ ·
Author   curl
🌐
GitHub
github.com › ziglang › zig › issues › 10946
zig 0.9.1 compilation error: 'curl/curl.h' file not found on macOS · Issue #10946 · ziglang/zig
February 20, 2022 - zig 0.9.1 compilation error: 'curl/curl.h' file not found on macOS#10946 · Copy link · Labels · bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorlinkingos-macos · Milestone · 0.14.0 ·
Author   ziglang
🌐
GitHub
github.com › jatinchowdhury18 › AnalogTapeModel › issues › 112
[BUG] curl/curl.h: No such file or directory · Issue #112 · jatinchowdhury18/AnalogTapeModel
November 30, 2020 - In file included from ../../JuceLibraryCode/include_juce_core.cpp:8:0: ../../../../modules/juce_core/juce_core.cpp:81:13: fatal error: curl/curl.h: No such file or directory #include <curl/curl.h> ^~~~~~~~~~~~~ compilation terminated.
Author   jatinchowdhury18
🌐
GitHub
github.com › alexa › avs-device-sdk › issues › 1850
fatal error: curl/curl.h: File or directory not found · Issue #1850 · alexa/avs-device-sdk
December 20, 2020 - fatal error: curl/curl.h: File or directory not found #1850 · Copy link · Labels · Awaiting more information · 0Wafflez0 · opened · on Dec 20, 2020 · Issue body actions · I wanted to make my own echo based on a Raspberry. So i used the instruction manual and got to work.
Author   alexa
🌐
Linus Tech Tips
linustechtips.com › software › programming
Fatal error C1083: Cannot open include file: 'curl.h': No such file or directory - Programming - Linus Tech Tips
March 7, 2021 - I'm trying to compile a .exe, but I get the error fatal error C1083: Cannot open include file: 'curl.h': No such file or directory. The curl.h is in the same folder as the requests.h. I use #include in a file called requests.h and both are in the same folder What is the problem? Th...
🌐
GitHub
github.com › dhruvbird › http-sync › issues › 25
curl/curl.h not found on windows · Issue #25 · dhruvbird/http-sync
January 11, 2014 - On windows I get the error message: ..\curllib.cc(11): fatal error C1083: Cannot open include file: 'curl/curl.h': No such file or directory [C:\GitHub\int egrate\node_modules\webdriver-http-sync\node_modules\http-sync\build\curllib.vcxp...
Author   dhruvbird
🌐
GitHub
github.com › wxWidgets › wxWidgets › issues › 23783
Missing curl/curl.h ? · Issue #23783 · wxWidgets/wxWidgets
August 18, 2023 - make: *** [Makefile:27575: netlib_webrequest.o] Error 1 curl.h doesn't exist in Archive .zip & .7z & Repo *Latest Stable Release: 3.2.2.1 / Windows ZIP / Windows 7z
Author   wxWidgets
🌐
GitHub
github.com › samtools › htslib › issues › 1793
fatal error: curl/curl.h: No such file or directory · Issue #1793 · samtools/htslib
June 20, 2024 - even though i have installed libcurl and curl i still get these errors 'fatal error: curl/curl.h: No such file or directory' . Can somebody help me
Author   samtools