/Usr/bin/ld: cannot find-lxxx problem summary

Source: Internet
Author: User

/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.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.