Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cURL command failure

I am attempting to use curl commands in a batch file I am writing. I have downloaded the latest curl executable and run it but I cannot use the command "curl" What steps should I take to use it correctly? The Command line still says

"curl is not recognized as an internal or external command, able program or batch file"

I am not interested in doing anything else with cURL

like image 826
jth41 Avatar asked Dec 23 '11 00:12

jth41


3 Answers

You will have to add the directory containing curl.exe to your path, probably the bin directory. In Windows XP you can do this by:

  1. Right click your computer and choose properties
  2. Click the advanced tab
  3. Click environmental variables
  4. Find path in the list and add the path to your curl directory
like image 151
Cyclonecode Avatar answered Sep 27 '22 20:09

Cyclonecode


Steps to install curl in windows

Install cURL on Windows

There are 4 steps to follow to get cURL installed on Windows.

Step 1 and Step 2 is to install SSL library. Step 3 is to install cURL. Step 4 is to install a recent certificate

Step One: Install Visual C++ 2008 Redistributables

Download Visual C++ 2008 Redistributables.

Step Two: Install Win(32/64) OpenSSL v1.0.0k Light

Also from http://www.shininglightpro.com/products/Win32OpenSSL.html For 64bit systems Win64 OpenSSL v1.0.0k Light For 32bit systems Win32 OpenSSL v1.0.0k Light

Step Three: Install cURL

Depending on if your system is 32 or 64 bit, download the corresponding** curl.exe.** For example, go to the Win64 - Generic section and download the Win64 binary with SSL support (the one where SSL is not crossed out). Visit http://curl.haxx.se/download.html More specific Link: http://curl.haxx.se/latest.cgi?curl=win64-ssl-sspi

Copy curl.exe to C:\Windows\System32

Step Four: Install Recent Certificates

Do not skip this step. Download a recent copy of valid CERT files from http://curl.haxx.se/ca/cacert.pem Copy it to the same folder as you placed curl.exe (C:\Windows\System32) and rename it as curl-ca-bundle.crt

If you have already installed curl or after doing the above steps, add the directory where it's installed to the windows path:

1 - From the Desktop, right-click My Computer and click Properties.
2 - Click Advanced System Settings .
3 - In the System Properties window click the Environment Variables button.
4 - Select Path and click Edit.
5 - Append ;c:\path to curl directory at the end.
5 - Click OK.
6 - Close and re-open the command prompt

like image 30
Nevin Raj Victor Avatar answered Sep 27 '22 19:09

Nevin Raj Victor


Looks like its not on your path - try opening a new console window.

like image 45
James Baxter Avatar answered Sep 27 '22 21:09

James Baxter