How to install zlib libgcrypt using apt-get?

When compiling you also need the development files, such as header files, for the required libraries. These generally live in separate packages. In this case that translates into you also needing the packages libgcrypt11-dev and zlib1g-dev.