145

I tried to enable curl on cygwin but it says bash: curl: command not found

How do I install curl on cygwin?

17 Answers 17

270

I just encountered this.

1) Find the cygwin setup.exe file from http://cygwin.com/ and run it.
2) Click/enter preferences until you reach the "Select Packages" window. (See image)
3) Click (+) for Net
4) Click the entry for curl. (Make sure you select the checkbox for the Binary)
5) Install.
6) Open a cygwin window and type curl.exe (should be available now).

Cygwin package manager

9
  • 3
    This helped me out considerably. I was having the same issue and was getting absolutely nowhere with the Windows CMD prompt. Thank you very much. Commented Jan 4, 2013 at 19:33
  • 3
    This answer is definitely more useful per say its easier to follow (more up votes), mentions clearly that setup has to be downloaded from cygwin website. It's a strong candidate of being selected as and answer.
    – Soumen
    Commented May 28, 2013 at 11:02
  • 10
    This might be quicker: Run setup-x86.exe -q -P curl in windows cmd window.
    – gm2008
    Commented Jul 10, 2014 at 8:38
  • 1
    Also you might have to grab libcurl-devel. Wouldn't work for me until I did that. Commented Sep 7, 2014 at 7:46
  • 1
    2.5) Can search for curl, that'll cut thru some of the scrolling. Search box shown in helpful screen above at the top.
    – joedragons
    Commented Feb 27, 2015 at 22:18
91

In the Cygwin package manager, click on curl from within the "net" category. Yes, it's that simple.

5
  • 17
    As @Casebash said it is the setup.exe and the Category name is Net, in that look for package name curl and select it. Commented Oct 19, 2013 at 7:42
  • It worked for me after couple tries. Make sure you select a server that's in your country.
    – user227353
    Commented Jan 8, 2015 at 16:18
  • 1
    I would prefer the method using apt-cyg as stated in other answers.
    – Moonlit
    Commented Sep 15, 2015 at 6:12
  • The "package manager" is the setup.exe BUT make sure you go through the same installation directories for your Cygwin program files and your Local Package directory so you don't loose previous installed packages. When something can go wrong, it will = Not simple Commented Feb 1, 2017 at 19:45
  • but in my case it wasn't available in the package manager doing a local install, but it was with a net install. So you may need to do that. Commented Feb 13, 2019 at 23:56
72

Nobody said how to install apt-cyg

in cygwin

lynx -source rawgit.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg
install apt-cyg /bin

now you can

apt-cyg install curl

For more, see the official github repository of apt-cyg.

4
  • 11
    This assumes you have lynx installed (I don't think it's installed by default). Commented Jan 28, 2016 at 5:15
  • Does apt-cyg support version targeting, like so apt-cyg install curl=5.5??
    – Danijel
    Commented Oct 18, 2016 at 8:38
  • 1
    @KeithThompson It is possible to use wget instead of lynx.
    – sohnryang
    Commented Jan 16, 2017 at 0:35
  • awesome, thanks For me: lynx -source raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg and also "apt-cyg update"
    – makiolo
    Commented Aug 10, 2017 at 12:04
33

apt-cyg is a great installer similar to apt-get to easily install any packages for Cygwin.

$ apt-cyg install curl

Note: apt-cyg should be first installed. You can do this from Windows command line:

cd c:\cygwin
cygwinsetup.exe -q -P wget,tar,qawk, bzip2,vim,lynx

Close Windows cmd, and open Cygwin Bash.

$ lynx -source rawgit.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg install apt-cyg /bin
$ chmod +x /bin/apt-cyg
5
  • 2
    Sorry. Why not just install curl using setup.exe directly: setup-x86.exe -q -P curl. But thanks for the post. Did not know the cygwin setup's command line use before.
    – gm2008
    Commented Jul 10, 2014 at 8:36
  • 2
    Once installed, with apt-cyg you have a bunch of comfortable possibilities to manage your packages, like searching or updating packages, list install packages and their dependencies, and more, just like using apt-get or yum on a regular linux shell.
    – Moonlit
    Commented Sep 15, 2015 at 6:17
  • 1
    I edited the question for updated installation method
    – gavioto
    Commented Oct 1, 2015 at 18:35
  • 1
    How to install the lynx . Commented Aug 21, 2018 at 7:11
  • Not working for me. It did some processing but in the end cmd prompt hangs.
    – A_01
    Commented Sep 16, 2018 at 9:56
19

In order to use the command-line version of curl, you need the curl executable. So, run the Cygwins Setup.exe, and select curl (under Net->curl). That one uses libcurl3, which is located in Libs->libcurl3. But libcurl3 will be pulled in as a dependency if it's not already installed. So, just select Net->curl and you're good to go.

0
10

In order to install any package,we must first find the setup.exe file.I could not locate this file.so i downloaded this file (or you can do a wget).I am on windows64 bit.So ,if you go to https://cygwin.com/install.html ,you can download setup-x86_64.exe file from the install and updates section,move this setup-x86_64.exe to your c:/cygwin64,and then run it from there ( setup-x86_64.exe -q -P curl)

1
  • Installer was in my Downloads folder
    – Keyslinger
    Commented Mar 12, 2015 at 17:43
4

I searched for curl on the cygwin packages part of their home page.

I found this link http://cygwin.com/packages/curl/. But that wasn't helpful because I couldn't download anything

So I searched for the curl-7.20.1-1 cygwin on Google. I found this helpful site mirrors.xmission.com/cygwin/release/curl/

That site had a link to download curl-7.20.1-1.tar.bz2. I unzipped it using 7zip. It unzips it into ./user/bin/ or something so I had to find curl.exe in the local /usr/bin folder and put it into my /bin folder of c:\cygwin

Finally I could use cURL!

This drove me crazy. I hope it helps someone!

2
  • Next time use cygwin's setup.exe it will just let you install packages from there. You can also get a program called cyg-apt which works like Debian/Ubuntu's apt-get. code.google.com/p/cyg-apt
    – ocodo
    Commented Sep 5, 2010 at 20:28
  • 1
    I tried to run setup.exe, but I couldn't find curl in the list. I don't know what I did wrong. Commented Sep 12, 2010 at 9:28
2

I just ran into this.

If you're not seeing curl in the list (see ibaralf's screenshot), then you may have out-of-date cygwin sources. In one of the screens in cygwin's setup.exe wizard, you have the option to "Install from Internet" or "Install from Local Directory". If you have the "Install from Local Directory" option enabled, then you may not see curl in the list. Switch to "Install from Internet" and select a mirror and then you should see curl.

1

You can try:

apt-cyg install curl
3
  • apt-cyg: command not found Is this only available on newer versions of Cygwin, or is it just a package that needs installed? My version is 1.7.16.
    – Lo-Tan
    Commented Apr 12, 2013 at 17:26
  • apt-cyg is a command-line installer for Cygwin which cooperates with Cygwin Setup and uses the same repository. The syntax is similar to apt-get code.google.com/p/apt-cyg Commented May 17, 2013 at 17:45
  • That's because you need to install apt-cyg first. See github.com/transcode-open/apt-cyg
    – Moonlit
    Commented Sep 15, 2015 at 6:19
0

For future reference:

Cygwin comes with many packages (among them curl, as you found) to install one of them you run the setup.exe program.

3
  • 1
    I have cygwin installed on windows 7. I cant find setup.exe. doing: "apt-cyg install curl" gives command not found. Doing "$ cd c:\cygwin" gives no such file or dir. Start->allprogs->cygwin doesnt have start.exe or similar, only terminal. So I can launch a terminal, but not start.exe. Any ideas? Commented Dec 2, 2013 at 12:51
  • I cannot find a setup.exe either.HELP Commented Jun 19, 2014 at 19:59
  • Setup should have initialized before confirming the installation. If you missed that step may have to reinstall.
    – Len Joseph
    Commented Mar 8, 2019 at 5:29
0

If someone is having problem with finding CURL in the list in setup.exe (Cygwin package manager) then trying downloading 64bit version of this setup. Worked for me.

1
  • Also you can try different server, as some of them doesn't have some packages.
    – FazoM
    Commented Aug 13, 2013 at 9:59
0

If you don't see a certain package, you can access to a full list of ports (also unnoficials, the packages you see on the web) launching the setup.exe with -k argument with value http://cygwinports.org/ports.gpg (example: C:\cygwin\setup\setup-x86.exe -K http://cygwinports.org/ports.gpg).

Doing so, you can choose a lot of extra packages, also extra versions of cURL (compat one). I do that to get Apache, cUrl, php5, php5-curl and some others :)

I don't know if apt-cyg can get those extra packages.

0

I just copied the folder "curl-7.43.0" from zip file that I downloaded from curl website curl.haxx.se into cygwin64 folder on drive C:. And then I have used it with prefix curl in cygwin command terminal.

My actual download location from softpedia, I have used Softpedia Mirror (US)

2
  • 1
    If you install it directly, bypassing the Cygwin setup*.exe utility, you won't get updates. Commented Jan 28, 2016 at 5:18
  • When you are on a computer with no administrator privileges my method can help, Also I am not so sure that you can't update it manually with console, I don't have cygwin right now on my computer, and I don't use it any more, so you can try methods that are described in this thread. and also this thread Commented Feb 5, 2016 at 22:53
0

From the documentation:

Installing and Updating Cygwin for 64-bit versions of Windows

Run setup-x86_64.exe any time you want to update or install a Cygwin package for 64-bit windows. The signature for setup-x86_64.exe can be used to verify the validity of this binary using this public key.

https://cygwin.com/install.html

0

On the Windows system where you want to install Cygwin with cURL download and run the Cygwin installer

64-bit: cygwin.com/setup-x86_64.exe 32-bit: cygwin.com/setup-x86.exe (if already installed, go to the setup file existed path)

D:\cygwin\setup (where the Cygwin is existed)

Click on the setup (setup-x86_64)

Follow the prompts in the Cygwin Setup wizard.

You can leave most settings at their default values. Pay specific attention to the following:

In the Select Your Internet Connectioin screen, select "Install from Internet".

In the Choose a download site screen, choose a site from the list, or add your own sites to the list, I have Chosen a: “mirrors.xmission.com”

The Select Packages screen displays a list of all the available packages and lets you select those you want to install. By default, only the packages in the "Base" category are marked for installation. The "Base" category does not include tools like cURL. You should select those explicitly.

By default, the packages are grouped by category. Click the View button to toggle to the Full view

Select all the curl packages by clicking the "Skip" button for each package once. Note how the "Skip" label changes to show the version number of the selected package.

the Select Packages screen should look like

Click Next through the rest of the wizard. The selected packages are downloaded and installed.

It worked for me and it resolved the issue : bash curl command not found cygwin

0

Installing libcurl-devel worked for me. Run cygwin setup. After you reach the Select package window search for curl, as shown in the screenshot. Select libcurl-devel and install the package.

1
  • While this code may answer the question, providing additional context regarding how and/or why it solves the problem would improve the answer's long-term value. Please read this how-to-answer for providing quality answer. Commented Jun 27, 2017 at 15:10
-1

Even below will install curl

cd c:\cygwin setup.exe -q -P curl

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.