How do I install zlib on Debian 6?

14

I want to install zlib on Debian 6. For this, I think I would use apt-get install, but I don't know which package to use. The package zlib doesn't exist, and if I install zlibc (which sounds most appropriate), running zlib -version brings up the error command not found. (I used apt-file search zlib to find zlibc.)

Is there another package which contains zlib, and how do I find this package?

strauberry

Posted 2011-05-09T09:42:12.870

Reputation: 527

Answers

8

A zlib command does not exist:

$ dpkg -L zlib1g
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/zlib1g
/usr/share/doc/zlib1g/copyright
/usr/share/doc/zlib1g/changelog.Debian.gz
/usr/share/doc/zlib1g/changelog.gz
/usr/lib
/usr/lib/libz.so.1.2.3.3
/usr/lib/libz.so.1

It is a library.

If you are searching for anything use apt-cache search.

And if you need a command to compress use either gzip or zip.

ceving

Posted 2011-05-09T09:42:12.870

Reputation: 1 737

23

apt-get install zlib1g, possibly zlib1g-dev as well.

LawrenceC

Posted 2011-05-09T09:42:12.870

Reputation: 63 487

1If you're using the zip extension on the docker php image, you'll need zlib1g-dev – Ray Foss – 2016-11-18T20:59:50.397

Thank you for your answer! When I use apt-get install zlibg1, I get "zlibg1 is allready the newest version"... After installing zlib1g-dev, "which zlib" is still empty. – strauberry – 2011-05-09T10:54:02.970

I'm noticing a /usr/lib/libz.so. Maybe Debian changed the name of it. – LawrenceC – 2011-05-09T11:00:30.450