Linux/usr/bin/ld cannot find solves the problem: the following error message often appears when compiling the source code of an application or lib in linux:/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) solution: (1) first judge the corresponding library file under/usr/lib (. so. (2) If the problem is not caused by symbolic link, but the system lacks the corresponding lib to install lib, it can be solved. (3) how to install the missing lib: the preceding three error messages are used as an example: Error 1 LIB error missing libc 2 LIB missing libltdl 3 LIB missing libXtst take Ubuntu as an example: search for the corresponding LIB before installing the job, such as: apt-cache search libc-devapt-cache search libltdl-dev apt-cache search libXtst-dev instance: when compiling the Source Code of the Input Method gcin, the following error message is displayed:/usr/bin/ld: cannot find-lXtst. After checking, it is found that: lib (. so file) the symbolic link is incorrect. Solution: cd/usr/libln-s libXtst. so.6 libXtst. 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 environment: vmware server + RHEL5.4 + fcitx3.63 encountered an error when executing make [root @ localhost fcitx-3.6.3] make all-recursivemake [1]: entering directory '/home/oracle/Desktop/fcitx-3.6.3' Making all in docmake [2]: Entering directory '/home/oracle/Desktop/fcitx-3.6.3/doc' make [2]: nothing to be done for 'all '. make [2]: Leaving directory '/home/oracle/Desktop/fcitx-3.6.3/doc' Making all in xpmmake [2]: entering directory '/home/oracle/Desktop/fcitx-3.6.3/xpm' make [2]: Nothing to be done for 'all '. make [2]: Leaving directory '/home/oracle/Desktop/fcitx-3.6.3/xpm' Making all in libmake [2]: entering directory '/home/oracle/Desktop/fcitx-3.6.3/lib' make [2]: Nothing to be done for 'all '. make [2]: Leaving directory '/home/oracle/Desktop/fcitx-3.6.3/lib' Making all in srcmake [2]: entering directory '/home/oracle/Desktop/fcitx-3.6.3/src' gcc-O2-fno-strength-reduce-g-O2-D_ENABLE_TRAY-Wall-lXpm-lXtst-lpthread-o fcitx IC. o ime. o InputWindow. o KeyList. o main. o MainWindow. o MyErrorsHandlers. o punc. o py. o PYFA. o pyMapTable. o pyParser. o sp. o tools. o ui. o table. o xim. o qw. o tray. o TrayWindow. o branch. o vk. o about. o QuickPhrase. o AutoEng. o extra. o internalVersion. o ImeRemote. o .. /lib/libXimd. a-lX11/usr/bin/ld: cannot find-lXtstcollect2: ld returned 1 exit statusmake [2]: *** [fcitx] Error 1 make [2]: leaving directory '/home/oracle/Desktop/fcitx-3.6.3/src' make [1]: *** [all-recursive] Error 1 make [1]: leaving directory '/home/oracle/Desktop/fcitx-3.6.3' make: *** [all] Error 2 No lXtst found under directory/usr/bin/ld