On Ubuntu (18.04), installing
zlib reported unable to locate package zlib:
$ sudo apt install zlib Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package zlib
How to install zlib in Ubuntu?
In Ubuntu, the zlib package is
$ sudo apt show zlib1g Package: zlib1g Version: 1:1.2.11.dfsg-0ubuntu2 Priority: required Section: libs Source: zlib Origin: Ubuntu Maintainer: Ubuntu Developers <email@example.com> Original-Maintainer: Mark Brown <firstname.lastname@example.org> Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 173 kB Provides: libz1 Depends: libc6 (>= 2.14) Conflicts: zlib1 (<= 1:1.0.4-7) Breaks: libxml2 (<< 2.7.6.dfsg-2), texlive-binaries (<< 2009-12) Homepage: http://zlib.net/ Task: minimal Supported: 5y Download-Size: 56.5 kB APT-Manual-Installed: yes APT-Sources: http://hk.archive.ubuntu.com/ubuntu bionic/main amd64 Packages Description: compression library - runtime zlib is a library implementing the deflate compression method found in gzip and PKZIP. This package includes the shared library.
You may install them by
$ sudo apt install zlib1g
If you would install the development package:
$ sudo apt install zlib1g-dev
And if you would link against zlib in your program, add
-lz to the
Download Zlib by using the following command :
Extract the file from the downloaded package:
tar -xvzf zlib-1.2.3.tar.gz
Enter the directory where the package is extracted:
Now configure Zlib directory:
Replace “/usr/local/zlib” above with the directory path where you want to copy the files and folders. Check whether you get any error message. Compile and install Zlib. If you are root run the following:
sudo make install
Library has bee successfully installed.
Get an awesome experience from https://dissertationpanda.com/ in dissertation writing service .