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
🌐
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
Discussions

[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
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++ - Getting error: fatal error: curl/curl.h: No such file or directory #include <curl/curl.h> - Stack Overflow
I'm trying to use cURL but every time I try to compile a project with it, I get the same error mentioned in the title. I am aware of the dozen or so post about similar issues. However, most of the More on stackoverflow.com
🌐 stackoverflow.com
[BUG] curl/curl.h: No such file or directory
There was an error while loading. Please reload this page · When running bash build_linux.sh I get More on github.com
🌐 github.com
6
November 30, 2020
🌐
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
🌐
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: No such file or directory" typically occurs when you are trying to compile a program that includes the libcurl library in a C or C++ environment, but the compiler cannot find the header file curl.h. This usually ...
🌐
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 - Also read: How to change file permissions recursively using Chmod in Linux? As mentioned before, fixing the error is easy; you must install the required Curl version or corresponding dependencies to resolve the error.
Find elsewhere
🌐
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 - If you are developing some native C application based on curl API's ( https://curl.haxx.se/libcurl/c/ ) , you will need to include necessary header at the top of the C program as, #include Now, if you use such header and tried to compile on Ubuntu, you may see an error like "fatal error: curl/curl.h: No
🌐
GitHub
github.com › jatinchowdhury18 › AnalogTapeModel › issues › 112
[BUG] curl/curl.h: No such file or directory · Issue #112 · jatinchowdhury18/AnalogTapeModel
November 30, 2020 - [BUG] curl/curl.h: No such file or directory#112 · Copy link · Assignees · Labels · bugSomething isn't workingSomething isn't working · ct2034 · opened · on Nov 30, 2020 · Issue body actions · When running bash build_linux.sh I get ... 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
🌐
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

🌐
Google Groups
groups.google.com › g › wx-dev › c › BTxRSs1d4iQ
Missing curl/curl.h ? (Issue #23783)
August 18, 2023 - In file included from ../src/common/webrequest.cpp:39: ../include/wx/private/webrequest_curl.h:22:10: fatal error: curl/curl.h: No such file or directory 22 | #include "curl/curl.h" | ^~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:27575: netlib_webrequest.o] Error 1 curl.h doesn't exist in Archive .zip & .7z *Latest Stable Release: 3.2.2.1 / Windows ZIP / Windows 7z ·
🌐
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...
🌐
Posit Community
forum.posit.co › general
installation of package ‘RCurl’ had non-zero exit status. Rcurl.h:4:23: fatal error: curl/curl.h: No such file or directory #include <curl/curl.h> - General - Posit Community
April 21, 2020 - Hi, I'm trying to install devtools::install_github("BillPetti/baseballr"). When I run it, I need to update RCurl first, but it will not let me. Please help! Here is the code. devtools::install_github("BillPetti/baseballr") Downloading GitHub repo BillPetti/baseballr@master These packages have ...
Top answer
1 of 3
1

As far as I know (at this date), curl is available from Windows 10 v1803 console (I tested and indeed it is). The detailed explanations are here. For the use of libcurl on windows 10, I could not really find resources

There is no curl precompiled package on other windows. You need to either build libcurl from the sources as explained from this excellent resource and here. I tested these resources and they work.

If you use Visual Studio, the resources also show how you configure Visual studio to use it in your programs but I you also have this on SO (I found this resource on SO: How do you properly install libcurl for use in visual studio 2017?)

2 of 3
0

I haven't used that API, but I have used C++ APIs with Visual Studio before, assuming that is your IDE. So i was looking at the tutorial suggested above: link

Basically you need to compile either Libcurl or curlcpp given that the API is written in C. The tutorial explains a method for each, but seems to me that the one suggested for Libcurl is easier, given that there's already a Visual Studio solution for it and you only need to do a double click and compile it (this is a guess, I haven't tried).

Then, once you have built the project, you'll get a folder with files, DLLs and LIB files. The tutorial only says to declare those directories in your project:

Add CURL_STATICLIB to the preprocessor definitions.
Add curl\include and curlcpp\include to the list of Additional Include Directories. (Make sure you include the correct relative paths.)
Add curl and curlcpp output folders, curl\build\lib\x86 and curlcpp\lib\x86\, to the Additional Library Directories.
Add the following static libraries to the list of Additional dependencies: libcurld.lib;curlcppd.lib;Crypt32.lib;ws2_32.lib;winmm.lib;wldap32.lib;

This mean, you need to open the Properties of your solution (Right click, Properties), and add the folders required to tell Visual Studio that you have header files outside the typical installation folders.

In the Properties page, Under Configuration Properties, you'll see a property called VC++ Include Directories, in the Include Directories option is where you have to add the paths for the curl\include and curlcpp\include to let VS know that you have headers there.

Navigate thru the Properties page and you'll find the option for all of those steps above, The Include Directory and Library Directory are under the VC++ Directories property, and the Additional Library Directory is under the Linker Properties.