Solution for glibcxx_3.4.9 error reported when programs compiled in centos 6 are running in centos 5 Environment

Source: Internet
Author: User

When the program testgcc compiled in centos 6 runs in centos 5, the following error occurs:./testgcc
./Testgcc:/usr/lib64/libstdc ++. so.6: Version 'glibcxx _ 3.4.9 'not found (required by./testgcc)
. /Testgcc:/usr/lib64/libstdc ++. so.6: Version 'glibcxx _ 3.4.11 'not found (required. /testgcc) the cause of this problem is that the GCC version in the centos5 environment is too low. If you do not want to upgrade GCC to directly run the centos6 compiled application, you can refer to the following method:

  1. Use rpmfind to find the required RMP package (libstdc ++-4.4.1-2. fc11.x86 _ 64.rpm corresponds to the default GCC version of centos 6)
  2. Download the RPM file and use rpm2cpio libstdc ++-4.4.1-2. fc11.x86 _ 64.rpm |
    Cpio-I -- make-directories unpackage
  3. Copy libstdc ++. so.6.0.12 to the application directory and rename it libstdc ++. so.6.
  4. Modify LD_LIBRARY_PATH to the directory of libstdc ++. so.6.
Related Article

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.