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

CompilationHeader FilesZlib

Compilation Problem Overview


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.

Compilation Solutions


Solution 1 - Compilation

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: <https://stackoverflow.com/q/22337896/55075>;.

Solution 2 - Compilation

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

configure
make -j4
make install

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser3043108View Question on Stackoverflow
Solution 1 - CompilationkenorbView Answer on Stackoverflow
Solution 2 - CompilationBashidView Answer on Stackoverflow