Showing posts with label lib missing. Show all posts
Showing posts with label lib missing. Show all posts

2017/08/28

Linux - How to solve the problem of "/usr/bin/ld: cannot find -lxxx"

When compiling applications or lib source codes, sometime we will encounter error message such as the one shown below.

/usr/bin/ld: cannot find -lxxx

Depending on the code being compiled, the error message may look like:

/usr/bin/ld: cannot find -lc
/usr/bin/ld: cannot find -lltdl
/usr/bin/ld: cannot find -lXlst

The xxx represents the name of the library, for example, libc.so, libltdl.so, libXtst.so. The naming rule is: lib + library name (i.e. xxx) + .so.