How to install new packages on Cygwin?

171

52

I installed the latest version of Cygwin with a number of packages. I soon realised that I need more packages (such as wget, etc) and I couldn't find a way to install the new packages without running the set up again and reinstall everything from scratch.

What I'm looking for is the equivalent of apt-get on Cygwin (if such a thing exists).

Mulone

Posted 2010-05-12T13:40:44.920

Reputation: 1 883

Answers

137

There is no package management in Cygwin outside of the setup program. The setup only applies updates to your current installation, it does not overwrite packages that what you already have (unless you have explicitly said so).

So rerun the setup program to install new packages.

Benoit Miller

Posted 2010-05-12T13:40:44.920

Reputation: 1 486

let's say I have a list of the following packages cygwin-devel gcc-core git libcom_err-devel libcom_err2 libcrypt-devel libcrypt0 libedit-devel libedit0 libgcc1 libgssapi_krb5_2 libiconv-devel libiconv2 libintl-devel libintl8 libk5crypto3 libkrb5-devel libkrb5_3 libkrb5support0 libncurses-devel libncursesw10 libopenssl100 libssp0-4.9.2-3 make openssl-devel w32api-headers w32api-includes zlib-devel zlib0-1.2.8-3 git wget How might i install them? – William – 2015-09-02T06:45:47.337

Someone already answered this here. Asking me directly was the wrong way to get a timely answer. :)

– Benoit Miller – 2015-11-18T19:04:22.387

2Does the setup.exe version have to be the same exact version as was initially installed? – James Wierzba – 2016-05-10T19:00:38.870

1No, that's the whole point. You will get the option to upgrade what you want if you run a more recent version of setup than what you already had installed. – Benoit Miller – 2016-06-22T14:16:33.630

86

There is a package called apt-cyg that may be what you are looking for. It appears to be based upon apt-get.

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.

An example command would be

$ apt-cyg install yourPackage

To install it you need wget, tar, gawk, and bzip2. You can download all these packages from the Cygwin packages list.

Chesh

Posted 2010-05-12T13:40:44.920

Reputation: 961

how do you install apt-cyg once you have downloaded wget, tar, gawk, and bzip2? thx – Adrien Be – 2013-12-11T10:22:07.123

4

answering my own question: http://superuser.com/a/41139/280964

– Adrien Be – 2013-12-11T10:42:31.217

19

Re-run the setup program again. This is how you update Cygwin as well.

Buggabill

Posted 2010-05-12T13:40:44.920

Reputation: 426

1I am doing this right now to install a single package, unzip. All I did is opened the setup GUI, searched for unzip, checked it to install bin. However, it almost looks like it's reinstalling everything. I see it going through packages like grep, libgtk, etc. It's been running for about 10 minutes and is only about 50% done. Is that normal? FYI, this is probably the first time in 8+ months I've run setup, so maybe all my packages are out of date? – SSilk – 2017-05-25T19:51:01.820

7thx, for those in doubt: it does not reinstall everything, it simply install the new packages that you select – Adrien Be – 2013-12-11T10:40:11.203

14

I find Chocolatey very useful for windows installations management (new, upgrade and removal), and cygwin is no exception!

I installed cygwin using Chocolatey, and since Chocolatey is installing using quiet/silent mode, you are not asked to select any packages and cygwin is installed with bare minimum packages :-(.

However, every time you wish to install a new package it is really-really, easy just use:
--source=cygwin. For example, installing bash:

choco install bash --source=cygwin

Tal Tikotzki

Posted 2010-05-12T13:40:44.920

Reputation: 141

5

You need to install 'lynx' at first in a common way. Then open cygwin and write this:

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

  2. install apt-cyg /bin

Now you can use package manager apt-cyg install

For more information see https://github.com/transcode-open/apt-cyg

Alex

Posted 2010-05-12T13:40:44.920

Reputation: 51

3

I was stuck with the same issue while trying to use curl on Windows and just got it resolved. Posting it here, now cause it might help someone.

The best way is to just use cygwin's setup.exe and select additional packages that you need. Go here: http://www.cygwin.com/install.html

"When installing packages for the first time, setup*.exe does not install every package. Only the minimal base packages from the Cygwin distribution are installed by default. Clicking on categories and packages in the setup*.exe package installation screen will provide you with the ability to control what is installed or updated."

Nitin Nain

Posted 2010-05-12T13:40:44.920

Reputation: 201

1

You can use Babun which is built around Cygwin and includes the package manager pact.

Babun supports installing new packages out of the box:

pact install wget

Matthias Braun

Posted 2010-05-12T13:40:44.920

Reputation: 572

0

Hi I know that it's old topic but just to add some info: You can also install program called MSYS2 which has the package manager PACMAN from Arch Linux and You are able to install all packs avaible for Arch :) Just pacman -S packageName and hit enter and it will dl it for You:)

Cheers :D

Horacy Pigula

Posted 2010-05-12T13:40:44.920

Reputation: 11

Welcome to Super User! Please read the question again carefully. Your answer does not answer the original question. OP is using Cygwin. You cannot mix and match bits of Cygwin with bits of Msys2 – DavidPostill – 2016-12-02T10:34:16.840

HI i know but check post above abouts Babuka which is looking like some project based on Cygwin like MSYS2 I've been talking about. – Horacy Pigula – 2016-12-04T13:01:21.617

There is a difference between Babuka which includes Cygwin and MSYS2 which is based on Cygwin. – DavidPostill – 2016-12-04T13:05:38.717

ah ok then sorry for misleading my bad :) – Horacy Pigula – 2016-12-05T14:38:26.833