beta.blog

Linux (Ubuntu)

Ubuntu: Installing zlib

by on Jun.24, 2010, under Linux (Ubuntu)

Today I tried to compile ProFTPd with some additional modules (for example: mod_quotatab). However, after configuring and trying to compile the project, I received an error message. It said something like /usr/bin/ld: cannot find -lz . I googled for this error message and found out, it was caused by a library called zlib, so I decided to install it ^^

1. Download the installation package (if the link doesn’t work, simply visit their website here)(Thanks to srinivasu for the updated link):
wget http://www.zlib.net/zlib-1.2.8.tar.gz

2. After downloading the package, extract it like that :
tar -xvzf zlib-1.2.8.tar.gz

3. Change to the directory we just created :
cd zlib-1.2.8

4. Configure the zlib library :
./configure --prefix=/usr/local/zlib

5. Compile it :
make

6. Install it :
sudo make install

That’s it, zlib should be installed properly

EDIT:
And here’s how to install the HEADER files of zlib. They’re needed when compiling several applications from source.

aptitude install zlib1g-dev
11 Comments more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!