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.

Answer from kenorb on Stack Overflow
🌐
GitHub
github.com › nx-python › PyNX › issues › 7
zlib.h error while building on macOS · Issue #7 · nx-python/PyNX
July 23, 2018 - ./Modules/zlibmodule.c:10:10: fatal error: zlib.h: No such file or directory #include "zlib.h"
Author   nx-python
🌐
GitHub
github.com › ZerBea › hcxtools › issues › 69
fatal error: zlib.h: No such file or directory · Issue #69 · ZerBea/hcxtools
September 14, 2018 - Running make when in the hcxtools directory I get an error Include/gzops.c:1:10: fatal error: zlib.h: No such file or directory #include <zlib.h>
Author   ZerBea
🌐
GitHub
github.com › tidyverse › haven › issues › 656
Installation error using install.packages("tidyverse"): "fatal error: zlib.h: No such file or directory" · Issue #656 · tidyverse/haven
January 18, 2022 - Installation error using install.packages("tidyverse"): "fatal error: zlib.h: No such file or directory"#656
Author   tidyverse
🌐
GitHub
github.com › BioInf-Wuerzburg › proovread › issues › 145
fatal error: zlib.h: No such file or directory · Issue #145 · BioInf-Wuerzburg/proovread
September 25, 2019 - linux@linux-virtual-machine:~/proovread$ make && make install git submodule init git submodule update --force Submodule path 'util/SeqChunker': checked out '676b02085c50d540223e5d648250e91c5749ccfe' Submodule path 'util/SeqFilter': checked out 'add13966d77f7d348368883213e156fc7034abc9' Submodule path 'util/bwa': checked out 'a0aadf47802aa45e5157562ee3f7099fe4b823af' cd util/bwa && make make[1]: Entering directory '/home/linux/proovread/util/bwa' gcc -c -g -Wall -Wno-unused-function -O2 -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS utils.c -o utils.o utils.c:33:10: fatal error: zlib.h: No such file or directory #include <zlib.h> ^~~~~~~~ compilation terminated.
Author   BioInf-Wuerzburg
🌐
GitHub
github.com › conan-io › conan › issues › 13886
[question] fatal error: zlib.h: No such file or directory | #include <zlib.h> · Issue #13886 · conan-io/conan
May 13, 2023 - cmake_minimum_required(VERSION 3.15) project(hello CXX) add_library(hello src/hello.cpp) target_include_directories(hello PUBLIC include) find_package(ZLIB) target_link_libraries(hello PRIVATE ${ZLIB_LIBRARIES}) set_target_properties(hello PROPERTIES PUBLIC_HEADER "include/hello.h") install(TARGETS hello)
Author   conan-io
🌐
Stack Overflow
stackoverflow.com › questions › 54337293 › fatal-error-zlib-h-no-such-file-or-directory-when-zlib-is-installed › 54340522
gcc - fatal error: zlib.h: No such file or directory when zlib is installed - Stack Overflow
> make make -C lib/utils libutils.a make[1]: Entering directory '/common/apps/biscuit/lib/utils' gcc -c -Wall -O2 wzvcf.c -o wzvcf.o In file included from wzvcf.h:29:0, from wzvcf.c:1: wzio.h:4:10: fatal error: zlib.h: No such file or directory #include <zlib.h> ^~~~~~~~ compilation terminated.
Find elsewhere
🌐
Ask Ubuntu
askubuntu.com › questions › 1124866 › ubuntu-bionic-18-04-fatal-error-zlib-h-no-such-file-or-directory-include
compiling - Ubuntu Bionic 18.04 -- fatal error: zlib.h: No such file or directory #include <zlib.h> - Ask Ubuntu
March 11, 2019 - So it looks like you have an anaconda3 toolchain that is taking over the build process (preventing the regular "system" toolchain from running). Unless that's intentional, I suggest you examine your ~/.bashrc and (at least temporarily) comment ...
🌐
GitHub
github.com › dfguan › asset › issues › 5
zlib.h: No such file or directory · Issue #5 · dfguan/asset
December 12, 2020 - zlib.h: No such file or directory#5 · Copy link · zhoudreames · opened · on Dec 12, 2020 · Issue body actions · I got a error when I have runned make,below this error. gcc -g -Wall -D VERBOSE -O2 -D PRINT_COVERAGE -c -o paf.o paf.c paf.c:1:10: fatal error: zlib.h: No such file or directory #include <zlib.h> ^~~~~~~~ compilation terminated.
Author   dfguan
🌐
SvennD
svennd.be › fatal-error-zlib-h-no-such-file-or-directory
fatal error: zlib.h: No such file or directory - SvennD
May 7, 2018 - fatal error: zlib.h: No such file or directory · Missing dependency ! I wish some tool would help out and tell you, what library I was missing, so I could stop making these posts. As to the solution : yum install zlib-devel · for debian : apt-get install libz-dev ·
🌐
Bioinformatics Answers
biostars.org › p › 391427
stringtie2 error : ./samtools-0.1.18/bgzf.h:29:10: fatal error: zlib.h: No such file or directory
July 25, 2019 - I got the error ./samtools-0.1.18/bgzf.h:29:10: fatal error: zlib.h: No such file or directory.
🌐
GitHub
github.com › openssl › openssl › issues › 7649
openssl-1.1.1, error when executing "make" · Issue #7649 · openssl/openssl
August 5, 2020 - Hi, I download openssl-1.1.1.tar.gz and use cygwin make it,but the command line show this error. crypto/comp/c_zlib.c:35:11: fatal error: zlib.h: No such file or directory # include crypto/comp/c_zlib.c:35:11: fatal error: zlib.h: No suc...
Author   openssl
🌐
GitHub
github.com › ccMSC › ckb › issues › 399
quazip/zip.h:56:18: fatal error: zlib.h: No such file or directory · Issue #399 · ccMSC/ckb
June 27, 2016 - quazip/zip.h:56:18: fatal error: zlib.h: No such file or directory#399 · Copy link · 0minousC0d3 · opened · on Jun 27, 2016 · Issue body actions · Tried running ./quickinstall and it failed 15 seconds in. Reactions are currently unavailable · No one assigned ·
Author   ccMSC
🌐
Google Groups
groups.google.com › g › snipersim › c › wkmEDJOefDQ
zlib.h not found
You can try "sudo yum upgrade && sudo yum install -y zlib-devel" to install the zlib development header.