Resolving "GLIBCXX_3.4.15' Not Found" Issue
While compiling programs, you may encounter an error stating "GLIBCXX_3.4.15 not found." Despite your suspicion that GLIBCXX_3.4.15 is missing from your Ubuntu system, this is not necessarily the case.
To verify the available GLIBCXX versions, you can run the command:
strings /usr/lib/libstdc++.so.6 | grep GLIBC
If the output contains GLIBCXX_3.4.15, then the library is present but may not be properly linked to the program you're trying to compile.
Solution:
The error may occur when compiling with a gcc version that is higher than the system default. In this situation, the new gcc version might require GLIBCXX_3.4.15, which is not available in the system directories.
To resolve this issue, manually locate the GLIBCXX_3.4.15 library file and redirect libstdc .so.6 to point to it. In the example provided, the library file is located at:
gcc/trunk/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6.0.15
Copy this file to /usr/lib and create a symlink to redirect libstdc .so.6:
sudo cp gcc/trunk/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6.0.15 /usr/lib/ sudo ln -sf /usr/lib/libstdc++.so.6.0.15 /usr/lib/libstdc++.so.6
After completing these steps, the program should compile successfully.
The above is the detailed content of Why Am I Getting the 'GLIBCXX_3.4.15 Not Found' Error During Compilation?. For more information, please follow other related articles on the PHP Chinese website!