Monday, October 31, 2011

Downloading and installing cURL on windows 7

cURL is a command-line tool. This means it is run from the command prompt (in Windows) or terminal (in Linux or OSX) and its results are displayed in the terminal window. There is no graphical interface. So in order to use cURL, you first have to open a command-line window.


To setup cURL:
  1. Download and unzip 64-bit cURL with SSL: http://curl.download.nextag.com/download/curl-7.21.7-win64-ssl-sspi.zip
  2. Copy the curl.exe file into your Windows PATH folder. By default, this is C:\Windows\System32.
  3. Download and install the Visual Studio 2010 C++ Runtime Redistributable 64 bit here: http://www.microsoft.com/download/en/details.aspx?id=13523
  4. Download the latest bundle of Certficate Authority Public Keys from http://curl.haxx.se/ca/cacert.pem
  5. Rename this file from cacert.pem to curl-ca-bundle.crt.
  6. Move this file into your Windows PATH folder. By default, this is C:\\Windows\System32.
Run cmd.exe to open your command prompt.
  1. type curl  http://www.google.com
  2. type curl  https://www.google.com
For both commands, you should see a couple pages of the HTML source code. If you see this, cURL is up and running!

11 comments:

  1. Thanx a lot! I was tired of installing it!

    ReplyDelete
  2. Thanx a lot! I was tired of installing it!

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. i hav followed all the above steps. but when I am try to type the
    curl http://www.google.com its telling curl: (6) Could not resolve host: www.google.com; Host not found

    ReplyDelete
    Replies
    1. Try it Again. I believe you must have missed something and Make sure you have copied the certificate and placed under correct directory with the correct name.

      Delete
  5. when i go to step 4 it is just a website what should i download it as

    ReplyDelete
    Replies
    1. Yes, The website has various certificates. Just copy the whole content by pressing Ctrl+A,Ctrl+C, paste into notepad and save as "curl-ca-bundle.crt" and move this file into your Windows PATH folder. By default, this is C:\\Windows\System32.

      Delete
  6. Wow Worked smoothly.... :)
    Thanks a lot.

    ReplyDelete
  7. Hey! Nice Post. Unfortunately, I ran into two problems:
    1. curl worked for http protocols, but not for https. I guessed it must have been a certificate access problem, I decided to use Git Bash instead. However when I try:

    \
    $ curl -sSL https://get.rvm.io | bash -s stable --rails
    I get the following error:
    bash line 84: conditional binary operator expected
    (23) Failed writing body.

    Any ideas what this might be?

    ReplyDelete
    Replies
    1. Thanks..!!!
      1. cURL works for both i,e http and https, I tried few https protocal and its working absolutely fine and thanks you gave me one more solution how to run https. :)
      2.Error messgae is "bash line 84: conditional binary operator expected" means use '||" instead of '|'.Hope it works... let me know if its doesn't work.

      Delete

How TOPT Works: Generating OTPs Without Internet Connection

Introduction Have you ever wondered how authentication apps like RSA Authenticator generate One-Time Passwords (OTPs) without requiring an i...