error: zlib.h:no such file or directory
I went to see the wrong file. There was such a sentence “include”
No such document?Then give it.
Then I searched zlib. H and found that it belongs to zlib.
Go to the next zlib.
Zlib address: http://www.zlib.net/
And then
Zlib Standard Installation Guide:
zlib library files are placed into /usr/local/lib and zlib header files are placed
into /usr/local/include, by default.
build static libraries
…/zlib-1.2.1]# ./configure
…/zlib-1.2.1]# make test
…/zlib-1.2.1]# make install
build shared libraries
…/zlib-1.2.1]# make clean
…/zlib-1.2.1]# ./configure –shared
…/zlib-1.2.1]# make test
…/zlib-1.2.1]# make install
…/zlib-1.2.1]# cp zutil.h /usr/local/include
…/zlib-1.2.1]# cp zutil.c /usr/local/include
/usr/local/lib should now contain…
libz.a
libz.so -&> libz.so .1.2.1
libz.so .1 -&> libz.so .1.2.1
libz.so .1.2.1
/usr/local/include should now contain…
zconf.h
zlib.h
zutil.h
Optional zlib non standard installation instructions:
create the directory that will contain zlib
…/zlib-1.2.1]# mkdir /usr/local/zlib
follow the given procedure above, except
…/zlib-1.2.1]# ./configure –prefix=/usr/local/zlib
Update the run time linker
/etc/ ld.so.cache will need to be updated with the new zlib shared lib: libz.so .1.2.1
for standard zlib installation…
add /usr/local/lib to /etc/ ld.so.conf , if specified path is not present
/etc]# ldconfig
if zlib was installed with a prefix…
add /usr/local/zlib/lib to /etc/ ld.so.conf
/etc]# ldconfig
It’s loaded again. OK.
Similar Posts:
- Install the software Yum to process the error segmentation fault [Solved]
- error while loading shared libraries: libz.so.1:
- [Solved] Ruby cannot load such file — zlib, openssl(LoadError), gem No rule to make target `/include/ruby.h’
- /usr/bin/ld: cannot find -lz
- How to Solve Error: protected multilib versions
- Python import random error handling method [Solved]
- Python Via get-pip.py Install pip Error: zipimport.ZipImportError: can‘t decompress data; zlib not availabl
- [Solved] Centos Install MYSQL Error: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
- [Solved] php -v Error: error while loading shared libraries: libonig.so.5:cannot open share directory
- When ffmpeg is used to push streaming, there may be an error: unknown encoder ‘libx264’