When compiling an application or lib source code in Linux, the following error message is often displayed:/usr/bin/ld: the cannot find-LXXX messages have different results as different source codes are compiled, for example,/usr/bin/ld: cannot find-LC/usr/bin/ld: cannot find-lltdl/usr/bin/ld: cannot find-lxtst. xxx indicates the name of the library file, as shown in the preceding example: libc. so, libltdl. so, libxtst. so. The naming rule is: Lib + Library name (XXX) +. So. There are three possible reasons for this: 1. The system has not installed the corresponding lib version of lib2. 3 lib (. the symbolic link of the so file is incorrect and is not linked to the correct library file (. so) If libxtst cannot be found in the/usr/lib directory. so file, it indicates that the libxtst library is not installed. The solution is as follows: APT-Get install libxtst-Dev
Solution/usr/lib/ld: cannot find-LC:
1. Search for the libc. So file in the system. An invalid link is found and deleted.
Libc. so.6, under the/usr/lib/i386-linux-gnu.
2. Go to the usr/lib directory: CD
/Usr/lib
3. Build link: sudo ln-SV/lib/i386-linux-gnu/libc. so.6
Libc. So
Solution/usr/lib/ld: cannot find-LM:
1. Search for the libm. So file in the system. Search for a libm. So file.
Under/usr/lib/i386-linux-gnu.
2. Go to the usr/lib directory: CD/usr/lib
3. Create a link: sudo
Ln-SV/usr/lib/i386-linux-gnu/libm. So libm. So
However, this problem should be due to the fact that the Library's header file library is not installed:
[[Email protected] lib] # Yum list all | grep ltdl libtool-ltdl.i386 1.5.22-7. el5_4 installed libtool-ltdl-devel.i386 1.5.22-7. el5_4 centos5.5-32
Installation header file:
[[Email protected] lib] # Yum-y install libtool-ltdl-devel.i386
...
The error is indeed caused by the uninstalled devel header file.
[[E-mail protected] lib] # rpm-QL libtool-ltdl-devel.i386/usr/include/ltdl. h/usr/lib/libltdl. a/usr/lib/libltdl. la/usr/lib/libltdl. so