Under Ubuntu encountered ld: can not find -lXX questions like, suggesting no relevant library file
If access to the Internet, do not mind the way most of waste:
$ sudo apt-get install apt-file
$ apt-file update
$ apt-file search libXX.so
apt-file lists all the apt package contains libXX.so files,
Select the appropriate package with the apt-get installed. Please select the package is usually installed with the dev, apt-get usage of self-examination, please.