Ubuntu: Installing zlib
by admin 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
July 6th, 2010 on 04:39
Guys I need some reff ;< .. please register: http://www.neobux.com/?r=h3x0r
July 12th, 2010 on 16:22
I’ve recently started a blog, the information you provide on this site has helped me tremendously. Thank you for all of your time & work.
August 3rd, 2010 on 07:03
shares use a fantastic webpage decent Gives thank you for the work to guide myself
September 29th, 2010 on 04:47
when i try to install zlib-1.2.5
when i put ./configure i get this. and i don´t know what to do. i installed first build-essential
Checking for gcc…
checking for shared library support…
No shared library support.
building static library libz.a version 1.2.5 with cc.
Checking for off64_t… No.
Checking for fseeko… No.
Checking for unistd.h… No.
checking whether to use vs[n]printf() or s[n]printf() …using s[n]printf().
Checking for snprintf() in stdio.h…No.
October 3rd, 2010 on 15:34
Try to install gcc via the following command:
apt-get install gcc
Then follow my tutorial and use:
./configure –prefix=/usr/local/zlib
I got the following output:
Checking for gcc…
Checking for shared library support…
Building shared library libz.so.1.2.5 with gcc.
Checking for off64_t… Yes.
Checking for fseeko… Yes.
Checking for unistd.h… Yes.
Checking whether to use vs[n]printf() or s[n]printf()… using vs[n]printf().
Checking for vsnprintf() in stdio.h… Yes.
Checking for return value of vsnprintf()… Yes.
Checking for attribute(visibility) support… Yes.
August 30th, 2012 on 02:36
need to update your post as zlib file is not found
command should now be wget http://www.zlib.net/zlib-1.2.7.tar.gz
hope this helps
May 15th, 2013 on 10:13
wget http://www.zlib.net/zlib-1.2.8.tar.gz
Thanks it working fine
June 22nd, 2013 on 23:07
thank you. It helped
October 9th, 2013 on 15:01
i am trying to compile zlib with above steps but am getting below error.
./configure –prefix=/ccmwa/fscm/siva/new/zlib
Checking for gcc…
Killed
/usr/ucb/cc: language optional software package not installed
Compiler error reporting is too harsh for ./configure (perhaps remove -Werror).
** ./configure aborting.
Please some one help to resolve this issue?
October 17th, 2013 on 17:11
Same error here (‘Compile error reporting is to harsh…’).
June 1st, 2017 on 07:51
Hi, sometimes I get a 400 server message when I browse this page. Just a heads up, best wishes