zlib1g is not a linux command/executable binary. zlib1g is a library and zlib1g-dev are headers for c/c++. You need to add linker flag -lz when compiling so it will include zlib.

Answer from Kenkoy on Stack Overflow
🌐
Debian
packages.debian.org › sid › zlib1g-dev
Debian -- Details of package zlib1g-dev in sid
zlib is a library implementing the deflate compression method found in gzip and PKZIP. This package includes the development support files · Tags: Software Development: Libraries, Role: Development Library, Program, Purpose: Compressing
🌐
Ubuntu
launchpad.net › ubuntu › bionic › +package › zlib1g-dev
zlib1g-dev : Bionic (18.04) : Ubuntu
zlib is a library implementing the deflate compression method found in gzip and PKZIP. This package includes the development support files. zlib 1:1.2.11.dfsg-0ubuntu2.2 source package in Ubuntu · zlib1g-dev 1:1.2.11.dfsg-0ubuntu2 in amd64 (Release)
🌐
Debian
packages.debian.org › bullseye › zlib1g-dev
I Challenge Thee
I Challenge Thee · AI scrapers break the web, to use this page you'll need JavaScript enabled
🌐
Pkgs.org
pkgs.org › download › zlib1g-dev
Zlib1g-dev Download for Linux (deb)
Download zlib1g-dev linux packages for Debian, Ubuntu
🌐
Ubuntu
launchpad.net › ubuntu › jammy › +package › zlib1g-dev
zlib1g-dev : Jammy (22.04) : Ubuntu
zlib is a library implementing the deflate compression method found in gzip and PKZIP. This package includes the development support files. zlib 1:1.2.11.dfsg-2ubuntu9.2 source package in Ubuntu · zlib1g-dev 1:1.2.11.dfsg-2ubuntu9 in amd64 ...
🌐
Ubuntu
launchpad.net › ubuntu › xenial › +package › zlib1g-dev
zlib1g-dev : Xenial (16.04) : Ubuntu - Launchpad
zlib is a library implementing the deflate compression method found in gzip and PKZIP. This package includes the development support files. zlib 1:1.2.8.dfsg-2ubuntu4.3 source package in Ubuntu · zlib1g-dev 1:1.2.8.dfsg-2ubuntu4 in amd64 (Release)
🌐
Linux Mint Community
community.linuxmint.com › software › view › zlib1g-dev
zlib1g-dev
Zlib is a library implementing the deflate compression method found in gzip and pkzip. this package includes the development support files.
🌐
Ubuntu
packages.ubuntu.com › jammy › zlib1g-dev
Ubuntu – Details of package zlib1g-dev in jammy
virtual package provided by libc6-dev · dep: zlib1g (= 1:1.2.11.dfsg-2ubuntu9) [not amd64, i386] compression library - runtime ·
Find elsewhere
🌐
Ubuntu
launchpad.net › ubuntu › noble › amd64 › zlib1g-dev
zlib1g-dev : amd64 : Noble (24.04) : Ubuntu
zlib1g-dev · zlib is a library implementing the deflate compression method found in gzip and PKZIP. This package includes the development support files. zlib package in Ubuntu · • Take the tour • Read the guide · © 2004 Canonical Ltd.
🌐
Debian
packages.debian.org › zlib1g-dev
Debian -- Package Search Results -- zlib1g-dev
sid (unstable) (libdevel): compression library - development 1:1.3.dfsg+really1.3.1-3: alpha amd64 arm64 armhf hppa i386 loong64 m68k ppc64 ppc64el riscv64 s390x sh4 sparc64 x32 1:1.3.dfsg-3.1 [debports]: ia64
🌐
Ubuntu
packages.ubuntu.com › bionic › zlib1g-dev
Ubuntu – Error
two or more packages specified (zlib1g-dev bionic) Content Copyright © 2026 Canonical Ltd.; See license terms. Ubuntu is a trademark of Canonical Ltd. Learn more about this site.
🌐
Ubuntu
launchpad.net › ubuntu › bionic › amd64 › zlib1g-dev
zlib1g-dev : amd64 : Bionic (18.04) : Ubuntu - Launchpad
zlib1g-dev · zlib is a library implementing the deflate compression method found in gzip and PKZIP. This package includes the development support files. zlib package in Ubuntu · • Take the tour • Read the guide · © 2004 Canonical Ltd.
🌐
GitHub
github.com › termux › termux-packages › issues › 6298
Package Request : zlib1g & zlib1g-dev · Issue #6298 · termux/termux-packages
January 24, 2021 - I have read Termux policy on package requests. Package description zlib is a library implementing the deflate compression method found in gzip and PKZIP. zlib1g-dev package includes the development support files for zlib1g. zlib1g is a c...
Author   termux
🌐
UbuntuUpdates
ubuntuupdates.org › package › core › bionic › main › updates › zlib1g-dev
UbuntuUpdates - Package "zlib1g-dev" (bionic 18.04)
compression library - development · zlib (1:1.2.11.dfsg-0ubuntu2.2) bionic-security; urgency=medium
🌐
Howtoinstall.me
howtoinstall.me › ubuntu › 18-04 › zlib1g-dev
How to Install zlib1g-dev in Ubuntu 18.04
zlib is a library implementing the deflate compression method found in gzip and PKZIP. This package includes the development support files.
Top answer
1 of 3
1

I was able to do the installation with:

sudo apt-get update && sudo sudo apt-get install zlib1g-dev

After updating /etc/apt/sources.list with the following:

Copy#------------------------------------------------------------------------------#
#                            OFFICIAL UBUNTU REPOS                             #
#------------------------------------------------------------------------------#


###### Ubuntu Main Repos
deb http:// us.archive .ubuntu. com/ubuntu/ xenial main restricted universe multiverse 
deb-src http:// us.archive .ubuntu. com/ubuntu/ xenial main restricted universe multiverse 

###### Ubuntu Update Repos
deb http:// us.archive .ubuntu. com/ubuntu/ xenial-security main restricted universe multiverse 
deb http://us.archive .ubuntu. com/ubuntu/ xenial-updates main restricted universe multiverse 
deb http:// us.archive .ubuntu. com/ubuntu/ xenial-proposed main restricted universe multiverse 
deb-src http:// us.archive .ubuntu. com/ubuntu/ xenial-security main restricted universe multiverse 
deb-src http:// us.archive .ubuntu. com/ubuntu/ xenial-updates main restricted universe multiverse 
deb-src http:// us.archive .ubuntu. com/ubuntu/ xenial-proposed main restricted universe multiverse 

###### Ubuntu Partner Repo
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
2 of 3
0

I would try a sudo apt-get update to start (sometimes the problem is trivial!). Consider including the results of dpkg --get-selections | grep hold in the comments.

Autoremove might help, too!

Finally, trying again with aptitude (https://unix.stackexchange.com/questions/767/what-is-the-real-difference-between-apt-get-and-aptitude-how-about-wajig) might highlight the issue.

Tough to diagnose without more information.

🌐
OMNeT++ Simulator
omnet-manual.com › home › how to import zlib1g dev packages in omnet++
HOW TO RUN ZLIB1G DEV PACKAGES IN OMNET++
November 10, 2024 - This library offers critical features ... as gzip and PNG. The zlib1g-dev package contains the requisite header files and static libraries necessary for compiling programs that rely on zlib....