0

apt-get no longer works. When I try anything with it, I get the error

apt-get: /opt/Xilinx/Vivado/2015.4/lib/lnx64.o/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /usr/lib/x86_64-linux-gnu/libapt-pkg.so.4.12)

Googling a way to fix this lead me to threads saying I should use apt-get to restore that file, but obviously that won't work in my case because apt-get is the thing that's not working. What should I do?

4
  • Have you set LD_LIBRARY_PATH or modified /etc/ld.so.conf or added an entry to /etc/ld.so.conf.d to point to the Xilinx directory? It seems this third-party library is overriding the OS provided stdc++ library and was compiled against a different version of glibc. Jun 24, 2016 at 15:58
  • So if I set LD_LIBRARY_PATH back to what it's supposed to be things should work again? How do I find out what the path is supposed to be, or what the ld.so.conf is supposed to look like? Is there a reference somewhere?
    – Zephyr
    Jun 24, 2016 at 17:02
  • 1
    Just unset LD_LIBRARY_PATH to reset it to the default. Jun 24, 2016 at 17:03
  • Oh wow, that was super easy. Thanks!
    – Zephyr
    Jun 24, 2016 at 17:18

1 Answer 1

1

(based on comments)

You have overridden the default library resolver path so that the stdc++ library is being called from the Xilinx directory, rather than the OS default. This library appears to be compiled against a different version of glibc.

You need to unset LD_LIBRARY_PATH to ensure the apt-get command only looks for the standard OS libraries.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.