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
🌐
Google Groups
groups.google.com › g › r-inla-discussion-group › c › IG9Y6rk2KuM
INLA Installation error
February 8, 2022 - Rcurl.h:4:10: fatal error: curl/curl.h: No such file or directory #include <curl/curl.h> ^~~~~~~~~~~~~ compilation terminated.
Discussions

r - Cannot install 'RCurl' (Rcurl.h:4:23: fatal error: curl/curl.h: No such file or directory) - Stack Overflow
I've tried numerous methods to install RCurl, to no avail. I get this in my output: * installing *source* package 'RCurl' ... ** package 'RCurl' successfully unpacked and MD5 sums checked ** l... More on stackoverflow.com
🌐 stackoverflow.com
January 23, 2020
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>
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 ... More on forum.posit.co
🌐 forum.posit.co
0
0
April 21, 2020
fatal error: curl/curl.h: No such file or directory
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 More on github.com
🌐 github.com
1
June 20, 2024
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
🌐
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 ...
🌐
OneCompiler
onecompiler.com › c › 3y27dnjx8
3y27dnjx8 - C - OneCompiler
HelloWorld.c:4:10: fatal error: curl/curl.h: No such file or directory #include <curl/curl.h> ^~~~~~~~~~~~~ compilation terminated.
🌐
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
Find elsewhere
🌐
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...
🌐
Reddit
reddit.com › r/rstudio › rcurl won't install - windows 10 - rstudio
r/RStudio on Reddit: RCurl won't Install - Windows 10 - RStudio
August 18, 2021 -

I have just installed RStudio and R 4.1.1 from the sites. I am able to successfully install.packages("curl") but when I try to install.packages("RCurl") I get the following error message. Any help would be appreciated.

I presume that 'curl' is installed appropriately considering I am able to load the library, but am unable to ascertain why RCurl will not install.

Note: I am a complete Novice to R, so I might be doing something wrong. I also tried using the 'Packages -> Install' option in the lower right quad of the screen.

R version 4.1.1 (2021-08-10) -- "Kick Things"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

> install.packages("curl")
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/curl_4.3.2.zip'
Content type 'application/zip' length 4322385 bytes (4.1 MB)
downloaded 4.1 MB

package ‘curl’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
	C:\Users\rober\AppData\Local\Temp\RtmpQN3XxO\downloaded_packages
> library(curl)
Using libcurl 7.64.1 with Schannel
> install.packages("RCurl")

  There is a binary version available but the source version is later:
        binary   source needs_compilation
RCurl 1.98-1.3 1.98-1.4              TRUE

installing the source package ‘RCurl’

trying URL 'https://cran.rstudio.com/src/contrib/RCurl_1.98-1.4.tar.gz'
Content type 'application/x-gzip' length 728818 bytes (711 KB)
downloaded 711 KB

* installing *source* package 'RCurl' ...
** package 'RCurl' successfully unpacked and MD5 sums checked
** using staged installation
** libs

*** arch - i386
"Z:/Applications/Software/rtools40/mingw32/bin/"gcc  -I"Z:/Applications/Software/R-4.1.1/include" -DNDEBUG -I/include -DHAVE_LIBIDN_FIELD=1 -DHAVE_CURLOPT_URL=1 -DHAVE_CURLINFO_EFFECTIVE_URL=1 -DHAVE_CURLINFO_RESPONSE_CODE=1 -DHAVE_CURLINFO_TOTAL_TIME=1 -DHAVE_CURLINFO_NAMELOOKUP_TIME=1 -DHAVE_CURLINFO_CONNECT_TIME=1 -DHAVE_CURLINFO_PRETRANSFER_TIME=1 -DHAVE_CURLINFO_SIZE_UPLOAD=1 -DHAVE_CURLINFO_SIZE_DOWNLOAD=1 -DHAVE_CURLINFO_SPEED_DOWNLOAD=1 -DHAVE_CURLINFO_SPEED_UPLOAD=1 -DHAVE_CURLINFO_HEADER_SIZE=1 -DHAVE_CURLINFO_REQUEST_SIZE=1 -DHAVE_CURLINFO_SSL_VERIFYRESULT=1 -DHAVE_CURLINFO_FILETIME=1 -DHAVE_CURLINFO_CONTENT_LENGTH_DOWNLOAD=1 -DHAVE_CURLINFO_CONTENT_LENGTH_UPLOAD=1 -DHAVE_CURLINFO_STARTTRANSFER_TIME=1 -DHAVE_CURLINFO_CONTENT_TYPE=1 -DHAVE_CURLINFO_REDIRECT_TIME=1 -DHAVE_CURLINFO_REDIRECT_COUNT=1 -DHAVE_CURLINFO_PRIVATE=1 -DHAVE_CURLINFO_HTTP_CONNECTCODE=1 -DHAVE_CURLINFO_HTTPAUTH_AVAIL=1 -DHAVE_CURLINFO_PROXYAUTH_AVAIL=1 -DHAVE_CURLINFO_OS_ERRNO=1 -DHAVE_CURLINFO_NUM_CONNECTS=1 -DHAVE_CURLINFO_SSL_ENGINES=1 -DHAVE_CURLINFO_COOKIELIST=1 -DHAVE_CURLINFO_LASTSOCKET=1 -DHAVE_CURLINFO_FTP_ENTRY_PATH=1 -DHAVE_CURLINFO_REDIRECT_URL=1 -DHAVE_CURLINFO_PRIMARY_IP=1 -DHAVE_CURLINFO_APPCONNECT_TIME=1 -DHAVE_CURLINFO_CERTINFO=1 -DHAVE_CURLINFO_CONDITION_UNMET=1 -DHAVE_CURLOPT_KEYPASSWD=1 -DHAVE_CURLOPT_DIRLISTONLY=1 -DHAVE_CURLOPT_APPEND=1 -DHAVE_CURLOPT_KRBLEVEL=1 -DHAVE_CURLOPT_USE_SSL=1 -DHAVE_CURLOPT_TIMEOUT_MS=1 -DHAVE_CURLOPT_CONNECTTIMEOUT_MS=1 -DHAVE_CURLOPT_HTTP_TRANSFER_DECODING=1 -DHAVE_CURLOPT_HTTP_CONTENT_DECODING=1 -DHAVE_CURLOPT_NEW_FILE_PERMS=1 -DHAVE_CURLOPT_NEW_DIRECTORY_PERMS=1 -DHAVE_CURLOPT_POSTREDIR=1 -DHAVE_CURLOPT_OPENSOCKETFUNCTION=1 -DHAVE_CURLOPT_OPENSOCKETDATA=1 -DHAVE_CURLOPT_COPYPOSTFIELDS=1 -DHAVE_CURLOPT_PROXY_TRANSFER_MODE=1 -DHAVE_CURLOPT_SEEKFUNCTION=1 -DHAVE_CURLOPT_SEEKDATA=1 -DHAVE_CURLOPT_CRLFILE=1 -DHAVE_CURLOPT_ISSUERCERT=1 -DHAVE_CURLOPT_ADDRESS_SCOPE=1 -DHAVE_CURLOPT_CERTINFO=1 -DHAVE_CURLOPT_USERNAME=1 -DHAVE_CURLOPT_PASSWORD=1 -DHAVE_CURLOPT_PROXYUSERNAME=1 -DHAVE_CURLOPT_PROXYPASSWORD=1 -DHAVE_CURLOPT_SSH_HOST_PUBLIC_KEY_MD5=1 -DHAVE_CURLOPT_NOPROXY=1 -DHAVE_CURLOPT_TFTP_BLKSIZE=1 -DHAVE_CURLOPT_SOCKS5_GSSAPI_SERVICE=1 -DHAVE_CURLOPT_SOCKS5_GSSAPI_NEC=1 -DHAVE_CURLOPT_PROTOCOLS=1 -DHAVE_CURLOPT_REDIR_PROTOCOLS=1 -DHAVE_CURLOPT_SSH_AUTH_TYPES=1 -DHAVE_CURLOPT_SSH_PUBLIC_KEYFILE=1 -DHAVE_CURLOPT_SSH_PRIVATE_KEYFILE=1 -DHAVE_CURLOPT_FTP_SSL_CCC=1 -DHAVE_CURLOPT_COOKIELIST=1 -DHAVE_CURLOPT_IGNORE_CONTENT_LENGTH=1 -DHAVE_CURLOPT_FTP_SKIP_PASV_IP=1 -DHAVE_CURLOPT_FTP_FILEMETHOD=1 -DHAVE_CURLOPT_LOCALPORT=1 -DHAVE_CURLOPT_LOCALPORTRANGE=1 -DHAVE_CURLOPT_CONNECT_ONLY=1 -DHAVE_CURLOPT_CONV_FROM_NETWORK_FUNCTION=1 -DHAVE_CURLOPT_CONV_TO_NETWORK_FUNCTION=1 -DHAVE_CURLOPT_CONV_FROM_UTF8_FUNCTION=1 -DHAVE_CURLOPT_MAX_SEND_SPEED_LARGE=1 -DHAVE_CURLOPT_MAX_RECV_SPEED_LARGE=1 -DHAVE_CURLOPT_FTP_ALTERNATIVE_TO_USER=1 -DHAVE_CURLOPT_SOCKOPTFUNCTION=1 -DHAVE_CURLOPT_SOCKOPTDATA=1 -DHAVE_CURLOPT_SSL_SESSIONID_CACHE=1 -DHAVE_CURLOPT_WRITEDATA=1 -DCURL_STATICLIB         -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign  -c base64.c -o base64.o
In file included from base64.c:1:
Rcurl.h:4:10: fatal error: curl/curl.h: No such file or directory
 #include <curl/curl.h>
          ^~~~~~~~~~~~~
compilation terminated.
make: *** [Z:/Applications/Software/R-4.1.1/etc/i386/Makeconf:238: base64.o] Error 1
ERROR: compilation failed for package 'RCurl'
* removing 'Z:/Applications/Software/R-4.1.1/library/RCurl'
Warning in install.packages :
  installation of package ‘RCurl’ had non-zero exit status

The downloaded source packages are in
	‘C:\Users\rober\AppData\Local\Temp\RtmpQN3XxO\downloaded_packages’
>
🌐
GitHub
github.com › swirldev › swirl › issues › 536
Install Swirl package - Rcurl.h:4:23: fatal error: curl/curl.h: No such file or directory · Issue #536 · swirldev/swirl
September 12, 2016 - 1/R/R-331.1/share/make/winshlib.mk" SHLIB="RCurl.dll" OBJECTS="base64.o curl.o curlInit.o curl_base64.o enums.o json.o memoryManagement.o myUTF8.o"' had status 2 ERROR: compilation failed for package 'RCurl' removing 'C:/Users/h/Documents/R/win-library/3.3/RCurl' Warning in install.packages : running command '"C:/PROGRA · 1/R/R-331.1/bin/x64/R" CMD INSTALL -l "C:\Users\h\Documents\R\win-library\3.3" C:\Users\h\AppData\Local\Temp\Rtmpe4zlmk/downloaded_packages/RCurl_1.95-4.8.tar.gz' had status 1 Warning in install.packages : installation of package ‘RCurl’ had non-zero exit status ERROR: dependency 'RCurl' is not available for package 'swirl'
Author   swirldev
🌐
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 - As mentioned before, fixing the error is easy; you must install the required Curl version or corresponding dependencies to resolve the error.
🌐
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.
🌐
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
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.

🌐
Programmerah
programmerah.com › rcurl-error-fatal-error-curl-curl-h-no-such-file-or-directory-35522
RCurl error-fatal error: curl/curl.h: No such file or directory | ProgrammerAH
August 24, 2021 - Due to the processing of special characters, curl cannot be accessed and the browser can access it. Solution of header file StdAfx. H “no such file or directory” in Visual Studio · MAFIA: 1- OpenFlow statistics (Counters, Timestamps)(mafia-sdn/p4demos/demos/1-openflow/1.1-statistics/p4src/of.p4) LDSC: Could not open Corces_ATAC_1000Gv3_ldscores/Corces_ATAC.1.1.l2.ldscore[./gz/bz2]