/Usr/bin/ld: cannot find-lxxx problem summary the following errors often occur when compiling applications in linux:/usr/bin/ld: cannot find-lxxx indicates that the corresponding library file cannot be found during the compilation process. -Lxxx indicates the libxxx. so file of the Linked Library. Note: Sometimes, because the library file is generated temporarily during the compilation process, this problem may occur if an error occurs before. The following is for the reason that the local system environment is missing .. This error is generally caused by the following reasons: 1. the system lacks the corresponding library file; 2. The version does not match; 3. The Library File Link is incorrect; 4. The library file path is set. For the first and second cases, you can download and install lib. For ubuntu, you can install it directly through apt-get: apt-get install libxxx-dev usually encounters this problem. The author will first check whether the system has installed the lib or has selected the correct version (just a habit ), if the problem persists, the cause is not a link error or a library file path error. Use the find or locate command to locate the link file and check whether the link file correctly points to the desired lib. If not, use ln-sf */libxxx. so. x */libxxx. modify the so command. If it is a problem caused by the library file path, you can go to/etc/ld. so. conf. d directory, modify any of the conf files (user-created conf can be used to facilitate identification), write the directory where lib is located, and enter ldconfig on the terminal to update the cache.