Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 718
  • Last Modified:

make process cannot find include files


Some software that i need to use depends on zlib. I looked in package manager and it said zlib1g was installed so I tried to make the software but got this error

make[1]: Entering directory `/home/andrea/samtools/samtools-0.1.6'
gcc -c -g -Wall -O2  -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -D_CURSES_LIB=1  bgzf.c -o bgzf.o
In file included from bgzf.c:36:
bgzf.h:30: fatal error: zlib.h: No such file or directory
compilation terminated.
make[1]: *** [bgzf.o] Error 1
make[1]: Leaving directory `/home/andrea/samtools/samtools-0.1.6'
make: *** [all-recur] Error 1

I tried installing zlib manually as I wasn't sure if the zlib1g in synaptic was the correct package so i installed zlib following the instructions here to /usr/local/zlib


I tried re-making but got the same error

zlib.h does seem to be on the system

locate zlib.h

I don't know much about make or where it looks for included files. How do i tell make where to look? In the Makefile for the software there is a line called INCLUDES= but this is empty/not set.

I'm nervous about fiddling around with these files. What happens to the system if a make process fails.

  • 2
1 Solution
What type of Linux do you have?  Do you have rpms and yum?

Mostly the head files are included in the devel package.  So you can try getting zlib-devel.

Of course this all depends upon the type of Linux you are using.
andiejeAuthor Commented:
I'm using ubuntu 10.10. I installed zlib1g-dev and it worked
How did you know:

zlib1g was the equivalent package for zlib?
how did you know i needed the development package as well?
It is complaining about C header file.  I have been making packages myself but not for Ubuntu, for Red Hat.  Header files are typically included in the devel package (develpment).

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now