"ERROR: zlib check failed" while compiling Qemu

I recently formatted my PC and reinstalled Ubuntu 13.04 via Wubi in Windows.

And after updates I'm getting this error:

basel@ubuntu:~/Desktop/qemu-1.6-test$ ./configure --cross-prefix=i586-mingw32msvc- --prefix=/home/basel/Desktop/qemu-1.6-test

ERROR: zlib check failed
       Make sure to have the zlib libs and headers installed.

How should I proceed?


You don't have the headers/libraries to build qemu. The easy way to solve this situation is doing:

sudo apt-get --no-install-recommends -y build-dep qemu

Now, to solve that message:

sudo apt-get install zlib1g-dev