Solve Missing Library Error in Ubuntu

In this article I want to share and also remind myself in the future on how to solve missing library error in Ubuntu. There was a time when I tried to compile some package library on Ubuntu.

When I tried to compile it I got a strange error “zlib.h : No such file or directory.”, this is a strange error that I had never encountered before.

After Googling for a while I got the solution as follows:

Search the zlib.h file in http://packages.ubuntu.com and you will get some results.

Ubuntu - Package Contents Search Results -- zlib h

Then I chose the library zlib1g-dev. Now all I have to do is install it:

$ sudo apt-get install zlib1g-dev

And everything is working like a charm.

Once again this is just a note to myself. But if you found this article useful and have any feedback, you are welcome to comment.