Software Development with Linux

Searching for missing include files

SUN, 01 MAR 2009

This problem happens to any Linux software developer. You're trying to compile some library, but ran into a dependency hell of missing include files. Finding all the necessary libraries can take a long time. Personally, I have often had this problem when building custom Linux systems from scratch.

Now, I just found this little application called "apt-file", that let's you search for which package provide a specific file.

Even if the main purpose of this tool is to help you on a Debian-based system, it can be of great help for any Linux system. Once you know the name of the package containing the required include file, it's easy to download the source of that library too. So, in my case, I will just have to add that library source to my embedded build system, and I can move on (until the next missing include file!).

For those want instruction on how to install and use that application in Debian, Ubuntu, and probably any other Debian-based system, here's a nice how to :
How to search for missing packages with apt-file on Debian and Ubuntu.