Centos 6.2 installation libpng error message configure: error: ZLib not installed
When compiling libpng-1.5.8.tar.gz, an error is reported. configure: error: ZLib not installed. I used the following package for compilation.
Zlib-1.2.6.tar.gz libpng-1.5.8.tar.gz
Solution:
1. Enter the source file directory of the zlib-1.2.6, execute the command make clean, clear zlib;
2. reconfigure./configure. Do not use the -- prefix parameter later;
3. Compile make & install make install;
4. Go to the libpng-1.5.8 directory and run the command./configure -- prefix =/usr/local/libpng;
5. Compile make & install make install;
6. The installation is successful;
Make [2]: Leaving directory '/tmp/libpng-1.5.8'
Test-z "/usr/local/libpng/share/man/man3" |/bin/mkdir-p "/usr/local/libpng/s hare/man/man3"
/Usr/bin/install-c-m 644 libpng.3 libpngpf.3 '/usr/local/libpng/share/man 3'
Test-z "/usr/local/libpng/share/man/man5" |/bin/mkdir-p "/usr/local/libpng/s hare/man/man5"
/Usr/bin/install-c-m 644 png.5 '/usr/local/libpng/share/man/man5'
Test-z "/usr/local/libpng/include/libpng15" |/bin/mkdir-p "/usr/local/libpng/include/libpng15"
/Usr/bin/install-c-m 644 pnglibconf. h '/usr/local/libpng/include/libpng15'
Test-z "/usr/local/libpng/lib/pkgconfig" |/bin/mkdir-p "/usr/local/libpng/li B/pkgconfig"
/Usr/bin/install-c-m 644 libpng15.pc '/usr/local/libpng/lib/pkgconfig'
Test-z "/usr/local/libpng/include/libpng15" |/bin/mkdir-p "/usr/local/libpng/include/libpng15"
/Usr/bin/install-c-m 644 png. h pngconf. H'/usr/local/libpng/include/libpng15'
Make install-data-hook
Make [2]: Entering directory '/tmp/libpng-1.5.8'
Cd/usr/local/libpng/include; rm-f png. h pngconf. h pnglibconf. h
Cd/usr/local/libpng/include; ln-s libpng15/png. h png. h
Cd/usr/local/libpng/include; ln-s libpng15/pngconf. h \
Pngconf. h
Cd/usr/local/libpng/include; ln-s libpng15/pnglibconf. h \
Pnglibconf. h
Cd/usr/local/libpng/lib/pkgconfig; rm-f libpng. pc
Cd/usr/local/libpng/lib/pkgconfig; ln-s libpng15.pc libpng. pc
Make [2]: Leaving directory '/tmp/libpng-1.5.8'
Make [1]: Leaving directory '/tmp/libpng-1.5.8'
[Root @ centos libpng-1.5.8] #
The directory has been created:
[Root @ centos tmp] # cd/usr/local/libpng/
[Root @ centos libpng] # ls
Bin include lib share
[Root @ centos libpng] #