trouble installwhen I install libpng in Cygwin64:configure: error: zlib not installed

89 Views Asked by At

# I first checked the lib if zlib has been installed like this:

pkg-config --list-all
zlib                           zlib - zlib compression library
libpcre                        libpcre - PCRE - Perl compatible regular expressions C library with 8 bit character support
libpcre16                      libpcre16 - PCRE - Perl compatible regular expressions C library with 16 bit character support
libpcre32                      libpcre32 - PCRE - Perl compatible regular expressions C library with 32 bit character support
libpcrecpp                     libpcrecpp - PCRECPP - C++ wrapper for PCRE
libpcreposix                   libpcreposix - PCREPosix - Posix compatible interface to libpcre

but it did not work.this is error

86186@LAPTOP-RSLI617S /cygdrive/e/libpng-1.6.39
$ ./configure && make && make install
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
...
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
...
...
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
...
checking for as... as
checking for dlltool... (cached) dlltool
checking for objdump... (cached) objdump
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
...
checking for zlibVersion in -lz... no
checking for z_zlibVersion in -lz... no
configure: error: zlib not installed

why? I will be appreciated if someone can help me

I check the path there is no mistake

pkg-config --list-all
zlib                           zlib - zlib compression library
libpcre                        libpcre - PCRE - Perl compatible regular expressions C library with 8 bit character support
libpcre16                      libpcre16 - PCRE - Perl compatible regular expressions C library with 16 bit character support
libpcre32                      libpcre32 - PCRE - Perl compatible regular expressions C library with 32 bit character support
libpcrecpp                     libpcrecpp - PCRECPP - C++ wrapper for PCRE
libpcreposix                   libpcreposix - PCREPosix - Posix compatible interface to libpcre
1

There are 1 best solutions below

0
matzeri On

Verify that the zlib packages are properly installed with

$ cygcheck -c zlib0 zlib-devel
Cygwin Package Information
Package              Version        Status
zlib-devel           1.2.13-1       OK
zlib0                1.2.13-1       OK

If both are OK, than you need to look inside the config.log written by configure to understand why the test failed.

Please note that the package you are trying to build is already available in cygwin

https://cygwin.com/packages/summary/libpng-devel.html