I'm trying to add nginx mp4 and upload module via

./configure --add-module=/tmp/nginx-upload-module-2.2.0

but it gives this(below) error. Whatever i tried, couldn't install the zlib. I need help..

./configure: error: the HTTP gzip module requires the zlib library.
You can either disable the module by using --without-http_gzip_module
option, or install the zlib library into the system, or build the zlib library
statically from the source with nginx by using --with-zlib=<path> option.

when i try to install zlib via

sudo apt-get install zlib1g-dev and this time it gives below error.

Package zlib1g-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Edit : Ubuntu version :

Distributor ID: Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:        16.04
Codename:       xenial
  • @dessert add this info to my question. it is 16.04.
    – fthopkins
    Nov 25 '17 at 14:55
  • On my 16.04 machine, sudo apt-get install zlib1g-dev simply installs this package, it should be available in every supported version. I assume there's something else going on here…
    – dessert
    Nov 25 '17 at 15:13
  • what can be the reason. Is it possible to related with etc/apt/source/sources.list.d, if then what should i do ? i cant find the reason. i will lose my mind..
    – fthopkins
    Nov 25 '17 at 15:16

A little late though. I guess you will need to install all the dependencies with the package. Try running:

apt-get install libpcre3 libpcre3-dev zlib1g zlib1g-dev libssl-dev
  • 3
    That would not solve the problem; if zlib1g-dev cannot be found, it will not suddenly appear after adding other packaes on the command line.
    – fkraiem
    Oct 6 '18 at 13:32
  • worked for me! Thanks!
    – Dara Java
    Mar 30 '20 at 3:51
  • No matter how hard I try, I always forget these! I've added to my newest docs (TLS, PCRE, and ZLIB support). Thanks for the reminder! Should be the accepted answer. Sep 22 '20 at 1:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.