Welcome to LQ. .. ..
Installing a new 'glib' will trash parts of Gnome etc.
1) Missing zlib ( development files ) : sudo apt-get install zlib1g-dev
( The main zlib ( run time files ) is already installed.)
2) I don't think you will need a new 'glib'.
It is installed by default. Install the missing glib parts:
sudo apt-get install libglib2.0-dev
Suggest : Make a list with the installed packages ..
dpkg --get-selections > selections.txt