Reference: http://blog.siyebocai.cn/20100324_5p424qs7.html
Generally, the usr/bin/ld: cannot find-LXXX error occurs during software compilation. The main cause is that the library file is not in the imported LD retrieval directory.
Solution:
1. Check whether the library file exists, such as-l123, and whether lib123.so exists under/usr/lib,/usr/local/lib, or other custom Lib. If only lib123.so. 1 exists,
You can use ln-SV lib123.so. 1 lib123.so to establish a connection and recreate lib123.so.
2. Check/etc/lD. so. whether the path of the library file in conf is correct. If the library file is not using the system path,/usr/lib,/usr/local/lib, you must add it to the file.
3. Ldconfig re-creates the lD. So. cache file, and stores the files in the ld library File Retrieval directory. Particularly for the software that has just been compiled and installed, you must run ldconfig
Library File Import lD. So. cache.
4. Test, GCC-l123 -- verbose.