81

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.

kenorb
  • 155,785
  • 88
  • 678
  • 743
user3043108
  • 965
  • 1
  • 8
  • 10
  • Possible duplicate of [Compilation error - missing zlib.h](https://stackoverflow.com/questions/18148075/compilation-error-missing-zlib-h) – kenorb Mar 08 '19 at 15:28

2 Answers2

149

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.

kenorb
  • 155,785
  • 88
  • 678
  • 743
9

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

configure
make -j4
make install
Bashid
  • 433
  • 5
  • 15