How to fix fatal error: zlib.h: no such file or directory?

牧云@^-^@ 提交于 2020-12-29 08:46:07

问题


I'm trying to compile miniSAT on Kali Linux 64 bits but I keep getting the error message:

fatal error: zlib.h: no such file or directory

I have read that there might be a linking problem that makes the compiler unable to find the header files, but I'm new to Linux and do not know how to solve that.


回答1:


You should install the development support files for zlib, try:

sudo apt-get install libz-dev

Other package names: zlib1g-dev.

If you've already zlib library, make sure you're compiling your code sources with -lz. See: missing zlib.h in ubuntu.




回答2:


Install zlib from it's source, solve my similar error. Download last version from this then:

configure
make -j4
make install


来源:https://stackoverflow.com/questions/36374267/how-to-fix-fatal-error-zlib-h-no-such-file-or-directory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!