Which cygwin package contains the zip command?

5

1

It's hard to believe, but there's no zip in my cygwin (I can't recall excluding any packages; on the opposite, I added a lot of stuff).

  • How can I install it?

The search page returns "zip", but typing "zip" in the cygwin-setup search window shows "bzip2" and "gzip" only, no "zip". I wouldn't be surprised if "zip" was contained in these packages, but while both "bzip2" and "gzip" commands work, I'm getting "zip: command not found".


My cygwin still pretends there's no zip at all:

> cygcheck -vf /usr/bin/zip
> type zip
bash: type: zip: not found
> /usr/bin/zip
bash: /usr/bin/zip: No such file or directory

And there's no "zip" package in my setup:

enter image description here

maaartinus

Posted 2013-01-29T21:52:51.223

Reputation: 3 054

2Which installation mirror are you using? What happens if you try a different one? – Keith Thompson – 2013-01-30T01:20:54.157

@Keith Thompson: No idea... I did "Download Without Installing" and then "Install from local directory" and don't know which one it was. Now I selected a new one and found the package. I really wonder why cygwin lists incomplete mirrors. I'd expect to get at least a complete list of all packages (if not the packages themselves). – maaartinus – 2013-01-30T02:27:23.490

Look in your local package directory (which you would have specified when you first ran setup.exe). There should be a subdirectory corresponding to each mirror you've used. If you find that there's an incomplete mirror, you might want to tell both the Cygwin folks and the owners of the mirror about the problem. – Keith Thompson – 2013-01-30T02:44:25.187

1Sounds like you didn't download the zip package when you did the "Download without installing" step. When you go to install from that download, you'll not find the zip package, because it wasn't downloaded. – me_and – 2013-01-30T21:40:42.820

I'm with @me_and: when you separate the download and install steps, the install step shows you only the packages you downloaded. You really really don't want Cygwin setup.exe to download everything. A full Cygwin mirror is something like 21 GB! – Warren Young – 2013-01-30T22:33:26.830

To Keith Thompson: In the meantime I've deleted it, so I'll never find out. To me_and: I'd expect zip to be installed by default and I'd swear I didn't exclude it. @Warren Young: I wouldn't mind downloading 21 GB, but I have no use for it. However, the complete list of all packages is surely much smaller and I really don't get why it's not present in every download. Selecting a non-downloaded package would simply prompt you to choose a mirror. Anyway, thanks to all! – maaartinus – 2013-01-31T00:34:21.417

That's a matter of opinion, of the same sort that gives us dozens of Linux distributions. There is no one perfect set of default packages for everyone. Cygwin chooses the minimalist route: the default install gets you only the barest stuff you need to provide a useful environment. zip and unzip commands are hardly a universal need. – Warren Young – 2013-01-31T00:44:13.057

Answers

6

The package itself is called zip. The page you link to is exactly it, so I'm not sure why it wouldn't be working for you. https://cygwin.com/packages/x86_64/zip/

$ which zip
/usr/bin/zip

$ cygcheck -vf /usr/bin/zip
/usr/bin/zip: found in package zip-3.0-11

Costa

Posted 2013-01-29T21:52:51.223

Reputation: 491

404 on the zip link – Don Cheadle – 2016-12-20T21:35:44.787

5Also remember that unzip is a different package, called unzip – Miserable Variable – 2013-01-29T22:26:44.390

@Costa: This sounds all logical, but see my question update. – maaartinus – 2013-01-29T23:18:40.557

After choosing a different mirror, it worked. Actually it was the comment by Keith Thompson which helped me most, but your answer is correct and helpful, too. – maaartinus – 2013-01-30T02:31:13.333