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:
- 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)
- Download the RPM file and use rpm2cpio libstdc ++-4.4.1-2. fc11.x86 _ 64.rpm |
Cpio-I -- make-directories unpackage
- Copy libstdc ++. so.6.0.12 to the application directory and rename it libstdc ++. so.6.
- Modify LD_LIBRARY_PATH to the directory of libstdc ++. so.6.