How to install zlib for ubuntu

In ubuntu, the zlib package is named zlib1g, so:

sudo apt install zlib1g zlib1g-dev