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 OverflowStack can't find curl (Windows 10)
find_package: Could NOT find CURL
windows - cmake: Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR) - Stack Overflow
Curl not working Windows 10 cmd - Stack Overflow
Does Windows 10 have cURL installed?
How do I update cURL to the latest version on Windows?
What is the difference between curl and curl.exe on Windows?
Videos
You might already have curl
It is possible that you won't need to download anything:
If you are on Windows 10, version 1803 or later, your OS ships with a copy of curl, already set up and ready to use.
If you have Git for Windows installed (if you downloaded Git from git-scm.com, the answer is yes), you have
curl.exeunder:C:\Program Files\Git\mingw64\bin\Simply add the above path to
PATH.
But curl may be a PowerShell alias to its own Invoke-WebRequest command. If that is the case, you can invoke actual curl as curl.exe, or remove the alias with rm alias:curl.
Installing curl with a package manager
If you are already using a package manager, it may be more convenient to install with one:
- For Chocolatey, run
choco install curl - For MSYS2, run
pacman -S curl - For Scoop, run
scoop install curl - For Cygwin, add the curl package in Cygwin Setup. EDIT by a reader: Cygwin installer design has changed, please choose curl packages as follows:

Installing curl manually
Downloading curl
It is too easy to accidentally download the wrong thing. If, on the curl homepage, you click the large and prominent "Download" section in the site header, and then the large and prominent curl-7.62.0.tar.gz link in its body, you will have downloaded a curl source package, which contains curl's source code but not curl.exe. Watch out for that.
Instead, click the large and prominent download links on this page. Those are the official Windows builds, and they are provided by the curl-for-win project.
If you have more esoteric needs (e.g. you want cygwin builds, third-party builds, libcurl, header files, sources, etc.), use the curl download wizard. After answering five questions, you will be presented with a list of download links.
Extracting and setting up curl
Find curl.exe within your downloaded package; it's probably under bin\.
Pick a location on your hard drive that will serve as a permanent home for curl:
- If you want to give curl its own folder,
C:\Program Files\curl\orC:\curl\will do. - If you have many loose executables, and you do not want to add many individual folders to
PATH, use a single folder such asC:\Program Files\tools\orC:\tools\for the purpose.
Place curl.exe under the folder. And never move the folder or its contents.
Next, you'll want to make curl available anywhere from the command line. To do this, add the folder to PATH, like this:
- Click the Windows 10 start menu. Start typing "environment".
- You'll see the search result Edit the system environment variables. Choose it.
- A System Properties window will popup. Click the Environment Variables button at the bottom.
- Select the "Path" variable under "System variables" (the lower box). Click the Edit button.
- Click the Add button and paste in the folder path where
curl.exelives. - Click OK as needed. Close open console windows and reopen, so they get the new
PATH.
Now enjoy typing curl at any command prompt. Party time!
Assuming you got it from https://curl.haxx.se/download.html, just unzip it wherever you want. No need to install. If you are going to use SSL, you need to download the OpenSSL DLLs, available from curl's website.
Hi All,
I tried building a project I'd just added Scalpel as a dependency of and it says it can't find curl:
Configuring curl-1.3.8...
setup.exe: Missing dependency on a foreign library:
* Missing (or bad) C library: curl
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.If the
library file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.
The problem is I do have curl installed and it's on the path. Any insights?
cURL on Windows
Skip to second section for more direct solutions
I have had a lot of issues with cURL on Windows. For example, and I realize your issue is likely much different than this, the following cURL command for RabbitMQ's HTTP API works great on Linux but does not work with the latest version of cURL on Windows 10.
curl -i -v -u root:root -H "content-type:application/json" -XPOST -d'{"vhost":"/","name":"amq.default","properties":{"delivery_mode":1,"headers":{}},"routing_key":"EMAIL","delivery_mode":"1","payload":"dasdfasdf","headers":{},"props":{},"payload_encoding":"string"}' http://localhost:15672/api/exchanges/%2f/amq.default/publish
I realize this might be a roundabout answer but I would do the following:
- In your start menu search for settings and click it
- Select Updates and Security
- Select For Developers
- Enabled Developer Mode
Once that is enabled restart your computer. Once the computer has started back up search for bash.exe. You now have access to an Ubuntu bash shell. Run cURL from there.
You can read more about this from here
More Direct solutions
If you don't want to do that I can think of two other things.
- Place the binary (exe) file in your root c:\ drive and then update your path variable to reflect the new location. Sometimes windows environment variables don't like spaces. Similarly you can just put quotes around it
"C:\Program Files\curl-7.57.0\AMD64" - If the above doesn't work, ,ake sure your path variable is set in system variables and not overridden in user variables by a path variable that doesn't include the location of your cURL binary file
- If it still doesn't work then put the path of the curl binary as the first entry in your path variable. I've also had windows path variable break when an entry before it was messed up... although I think that might have been fixed with windows 10.
Also, this is my personal preference, but I generally like to create create a new environment variable with the location. For example:
CURL - "C:\Program Files\curl-7.57.0\AMD64"
Then I append to the end of PATH a reference to the new CURL variable
%CURL%
I'm not saying this is necessary, just my preference. The double quotes will probably fix your issue though.
Add -L to follow redirections:
curl -fL <URL>