Linux - Running Executable Error (GLIBCXX_3.4.21 n

2019-09-10 06:58发布

问题:

I'm trying to deploy my application as a stand-alone that can work on any Linux machine. I've built my application under Qt Creator and have successfully statically linked my application. However, when I test the application on another Linux machine, I get the following error:

libstdc++.so.6: version 'GLIBCXX_3.4.21' not found (required by ./Executable)

I'm not sure how to resolve this error.

回答1:

This is a error i had myself, but in another context. What this means is: libstdc++.so.6 (a shared object file, the standard library of c++ programms, that many programms can use together(share)) is another version then the program you compiled requires.

i had this issue when switching from gcc-4.8 to gcc-5.

Have you using different linux distros when compiling and executing? (Ubuntu?)

You must make sure the versions match, or statically compile the used libstdc++ into your binary as well.

Here is a SO question relating to these kind of issues. GLIBCXX versions



标签: linux qt