Monday, November 19, 2012

libstdc++.so.6: version `GLIBCXX_3.4.11' not found

I encountered this problem with the LibreOffice 3.6.2.2 (Build ID: da8c1e6) on fedora 17 with Linux kernel 3.6.6-1.fc17.x86_64

I search the net and I found no clear solution so I took it on my own.

This is the error that pop up to me:

(soffice:5947): Gtk-WARNING **: /opt/libreoffice3.6/program/../ure-link/lib/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /usr/lib64/gtk-2.0/2.10.0/engines/liboxygen-gtk.so)



this solution applies also to this error:
(soffice:3737): Gtk-WARNING **: /opt/libreoffice3.6/program/../ure-link/lib/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib64/gtk-2.0/2.10.0/engines/liboxygen-gtk.so)

or any error that related to newer versions of GLIBCXX_ like GLIBCXX_3.4.12 or GLIBCXX_3.4.13

What I found is that libstdc++.so.6 that is located in:
 /opt/libreoffice3.6/program/../ure-link/lib/

does not have the "strings"
GLIBCXX_3.4.11
or of higher versions like
GLIBCXX_3.4.15

so we need a file that contains that "string" and then replace it with the old one.

And here is the solution:
1- Go to http://rpm.pbone.net
     and choose Advanced Search and choose only the distribution you are using

2- Search for libstdc++ and choose the latest version that is compatible with your
    architecture (x86_64, i586, i386, i686, or amd64).
    What fits for me: libstdc++-4.7.0-0.12.fc17.x86_64.rpm

3- Extract the rpm package using File Roller(with gnome) or Ark (on KDE). I used Ark.

4- A new file named usr will be created, move inside it using:
    # cd usr

5- Move to the directory lib or lib64 ( depending on your architecture )
    # cd lib64

6- You will find two file
    - libstdc++.so.6
    - libstdc++.so.6.0.xx (xx depends on the version you downloaded)
       and at the time of writing this post the latest version is libstdc++.so.6.0.17
7- Delete libstdc++.so.6 and rename libstdc++.so.6.0.17 to libstdc++.so.6.

8- Now rename the originale file that caused the problem and we want to replace it
    (just because we need a backup for it)
    # sudo mv /opt/libreoffice3.6/program/../ure-link/lib/libstdc++.so.6
        /opt/libreoffice3.6/program/../ure-link/lib/libstdc++.so.6_backup

9- Now move the new file we got in step 6 and copy(or move) it to the path of the
    old one that caused the problem
    # sudo mv libstdc++.so.6 /opt/libreoffice3.6/program/../ure-link/lib/libstdc++.so.6

10- Run your program and your problem will be gone.

Please if you encountered any problem let me know by commenting.

If the post solved your problem, please comment.

No comments:

Post a Comment