This question already has an answer here:
Hunting for dependencies when compiling software from the scratch is practically unavoidable. In Debian-based Linux distributions which use the apt-get utility to manage packages, there is also a nice command named
apt-file. One can use it to search for (missing/wanted) files inside packages to actually trace the required package(s).