If you may get an error while installing or configuring package in your Linux system, 

configure: error: Zlib header (zlib.h) not found. Tor requires zlib to

build. You may need to install a zlib development package.

Install zlib-devel package using YUM command,

# yum install  zlib-devel -y

If you are working on Ubuntu system execute below command,
# sudo apt-get install zlib1g-dev libncurses5-dev