GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference












3














When trying to execute any c++ programs, I get this error. The full error message is:



./main: relocation error: ./main: symbol _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference


in my /usr/local/lib64 folder they all seem to be there:




libssp.so.0.0.0
libstdc++.a
libstdc++fs.a
libstdc++fs.la
libstdc++.la
libstdc++.so
libstdc++.so.6
libstdc++.so.6.0.21
libstdc++.so.6.0.21-gdb.py
libsupc++.a
libsupc++.la




in my ./include folder, all the C++stdlib headers are there, and they seem to be working as I will get errors from them if I have syntax errors or something, hell, the files even compile fine but i get this error at runtime. I have not yet tried simply reinstalling all the libraries, as i'm not totally sure if that is necessary. Can someone help explain this error to me?



I have tried various fixes suggested on GLIB_3.4.15 error pages on this site, although either I followed those instructions incorrectly or they did not work for me.



I am running Ubuntu 14.04 LTS, and my GCC version is 5.3.0










share|improve this question





























    3














    When trying to execute any c++ programs, I get this error. The full error message is:



    ./main: relocation error: ./main: symbol _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference


    in my /usr/local/lib64 folder they all seem to be there:




    libssp.so.0.0.0
    libstdc++.a
    libstdc++fs.a
    libstdc++fs.la
    libstdc++.la
    libstdc++.so
    libstdc++.so.6
    libstdc++.so.6.0.21
    libstdc++.so.6.0.21-gdb.py
    libsupc++.a
    libsupc++.la




    in my ./include folder, all the C++stdlib headers are there, and they seem to be working as I will get errors from them if I have syntax errors or something, hell, the files even compile fine but i get this error at runtime. I have not yet tried simply reinstalling all the libraries, as i'm not totally sure if that is necessary. Can someone help explain this error to me?



    I have tried various fixes suggested on GLIB_3.4.15 error pages on this site, although either I followed those instructions incorrectly or they did not work for me.



    I am running Ubuntu 14.04 LTS, and my GCC version is 5.3.0










    share|improve this question



























      3












      3








      3







      When trying to execute any c++ programs, I get this error. The full error message is:



      ./main: relocation error: ./main: symbol _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference


      in my /usr/local/lib64 folder they all seem to be there:




      libssp.so.0.0.0
      libstdc++.a
      libstdc++fs.a
      libstdc++fs.la
      libstdc++.la
      libstdc++.so
      libstdc++.so.6
      libstdc++.so.6.0.21
      libstdc++.so.6.0.21-gdb.py
      libsupc++.a
      libsupc++.la




      in my ./include folder, all the C++stdlib headers are there, and they seem to be working as I will get errors from them if I have syntax errors or something, hell, the files even compile fine but i get this error at runtime. I have not yet tried simply reinstalling all the libraries, as i'm not totally sure if that is necessary. Can someone help explain this error to me?



      I have tried various fixes suggested on GLIB_3.4.15 error pages on this site, although either I followed those instructions incorrectly or they did not work for me.



      I am running Ubuntu 14.04 LTS, and my GCC version is 5.3.0










      share|improve this question















      When trying to execute any c++ programs, I get this error. The full error message is:



      ./main: relocation error: ./main: symbol _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference


      in my /usr/local/lib64 folder they all seem to be there:




      libssp.so.0.0.0
      libstdc++.a
      libstdc++fs.a
      libstdc++fs.la
      libstdc++.la
      libstdc++.so
      libstdc++.so.6
      libstdc++.so.6.0.21
      libstdc++.so.6.0.21-gdb.py
      libsupc++.a
      libsupc++.la




      in my ./include folder, all the C++stdlib headers are there, and they seem to be working as I will get errors from them if I have syntax errors or something, hell, the files even compile fine but i get this error at runtime. I have not yet tried simply reinstalling all the libraries, as i'm not totally sure if that is necessary. Can someone help explain this error to me?



      I have tried various fixes suggested on GLIB_3.4.15 error pages on this site, although either I followed those instructions incorrectly or they did not work for me.



      I am running Ubuntu 14.04 LTS, and my GCC version is 5.3.0







      compiling c++ glibc






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 20 '16 at 3:03

























      asked Apr 20 '16 at 2:50









      asharkdoctor

      2414




      2414






















          1 Answer
          1






          active

          oldest

          votes


















          0














          This is because it's looking for a symbol from GLIBCXX_3.4.21, while you presumably have a lower version. Update your library, it's the easiest way. Or you can do something like what's done here



          https://stackoverflow.com/questions/4032373/linking-against-an-old-version-of-libc-to-provide-greater-application-coverage



          https://stackoverflow.com/questions/32577224/unable-to-use-stdchrono-with-stdfuture-glibcxx-3-4-19-not-found?noredirect=1&lq=1






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "89"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f759320%2fglibcxx-3-4-21-not-defined-in-file-libstdc-so-6-with-link-time-reference%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            This is because it's looking for a symbol from GLIBCXX_3.4.21, while you presumably have a lower version. Update your library, it's the easiest way. Or you can do something like what's done here



            https://stackoverflow.com/questions/4032373/linking-against-an-old-version-of-libc-to-provide-greater-application-coverage



            https://stackoverflow.com/questions/32577224/unable-to-use-stdchrono-with-stdfuture-glibcxx-3-4-19-not-found?noredirect=1&lq=1






            share|improve this answer




























              0














              This is because it's looking for a symbol from GLIBCXX_3.4.21, while you presumably have a lower version. Update your library, it's the easiest way. Or you can do something like what's done here



              https://stackoverflow.com/questions/4032373/linking-against-an-old-version-of-libc-to-provide-greater-application-coverage



              https://stackoverflow.com/questions/32577224/unable-to-use-stdchrono-with-stdfuture-glibcxx-3-4-19-not-found?noredirect=1&lq=1






              share|improve this answer


























                0












                0








                0






                This is because it's looking for a symbol from GLIBCXX_3.4.21, while you presumably have a lower version. Update your library, it's the easiest way. Or you can do something like what's done here



                https://stackoverflow.com/questions/4032373/linking-against-an-old-version-of-libc-to-provide-greater-application-coverage



                https://stackoverflow.com/questions/32577224/unable-to-use-stdchrono-with-stdfuture-glibcxx-3-4-19-not-found?noredirect=1&lq=1






                share|improve this answer














                This is because it's looking for a symbol from GLIBCXX_3.4.21, while you presumably have a lower version. Update your library, it's the easiest way. Or you can do something like what's done here



                https://stackoverflow.com/questions/4032373/linking-against-an-old-version-of-libc-to-provide-greater-application-coverage



                https://stackoverflow.com/questions/32577224/unable-to-use-stdchrono-with-stdfuture-glibcxx-3-4-19-not-found?noredirect=1&lq=1







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited May 23 '17 at 12:39









                Community

                1




                1










                answered Nov 6 '16 at 2:42









                ajiljalal

                1




                1






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Ask Ubuntu!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f759320%2fglibcxx-3-4-21-not-defined-in-file-libstdc-so-6-with-link-time-reference%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Category:香港粉麵

                    List *all* the tuples!

                    Channel [V]