Linux/usr/bin/ldcannotfind solves the problem: when compiling an application or lib sourcecode in linux, the following error message is often displayed:/usr/bin/ld: cannotfind-lxxx, these messages will vary with the compilation of different types of sourcecode... 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
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.