52

To upload the raw-reads > 2GB to SRA on Genebank, I installed aspera connect plug-in on ubuntu 16.04. But the plug-in did not pop up as indicated by the instruction on the genebank SRA portal.

I got this error on the terminal as I initializing the plug-in locally (~/.aspera/connect/bin/asperaconnect):

lib/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /usr/lib/x86_64-linux-gnu/libproxy.so.1)
Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgiolibproxy.so

I followed some of the threads, created a link to /usr/lib/libstdc++.so.6 But it did not address the problem, still showing the error message above. running strings /usr/lib/libstdc++.so.6 | grep GLIBCXX got this:

strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_DEBUG_MESSAGE_LENGTH

GLIBCXX_3.4.20 is in the list. I don't know how to make the plug-in recognize that.

Thank you, Xp

Xp.L
  • 837
  • 1
  • 7
  • 13
  • 1
    So you now have a symlink in /usr/lib pointing to /usr/lib/x86_64-linux-gnu/libstdc++.so.6? Are you sure there are no older versions of libstdc++ around, maybe in ~/lib? Maybe the plugin comes with its own older version, but loads the system's libproxy, which in turn needs a newer libstdc++. – Karsten Koop Jun 27 '17 at 06:40
  • 1
    What is a question about *running* software doing on a site explicitly scoped to *developing* software? Any sysadmin can run into this issue, with no development involved. – Charles Duffy Oct 06 '17 at 20:57

5 Answers5

34

Here's a solution for this problem in Ubuntu 16.04

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.9
sudo apt-get upgrade libstdc++6

You can check if you get GLIBCXX desired version like this:

strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
Krishan Kumar Mourya
  • 2,207
  • 3
  • 26
  • 31
  • 4
    This one worked for me, Linux Mint (Ubuntu Xenial 16.04). Specially, I was facing this issue after upgrading to FileZilla 3.30.0 and it would no longer run, so hopefully whoever needs this comment finds it. – CoderGuy123 Feb 22 '18 at 01:31
  • 1
    It doesn't support GLIBCXX 3.4.20 and 21. Could I do anything about it? – Alex Mar 21 '18 at 15:30
28

I solved problem like this (but GLIBCXX_3.4.21 on CentOS) but it is not dependent from os. The library is part of gcc compiler so need to install or compile appropriate version of gcc. This is table of versions of gcc and versions of appropriate libstdc++:

GCC 4.9.0: libstdc++.so.6.0.20
GCC 5.1.0: libstdc++.so.6.0.21
GCC 6.1.0: libstdc++.so.6.0.22
GCC 7.1.0: libstdc++.so.6.0.23
GCC 7.2.0: libstdc++.so.6.0.24
GCC 8.0.0: libstdc++.so.6.0.25

( full list of versions is here )

It is not dependent from how to install gcc - it may be installed from package or compiled and installed from sources.

It is possible that system gcc libraries is available instead of newely installed. So need to specify environment variable where to find libraries for example in command line like this:

$ LD_LIBRARY_PATH=/usr/local/lib64 command args ...
oklas
  • 7,935
  • 2
  • 26
  • 42
  • 1
    I fixed this permanently by updating the link `/usr/lib64/libstdc++.so.6` to point to the newer version I had at `/usr/local/lib64/libstdc++.so.6` with this command: `ln -fs /usr/local/lib64/libstdc++.so.6 /usr/lib64/libstdc++.so.6`. The old version remains with no link pointing to it if you need to revert. A bit of a hack but it works. – Matthew Aug 22 '19 at 20:44
  • 2
    That GNU reference saved my day! Really appreciate that! – absuu Jan 17 '22 at 12:26
  • 2
    To configure permanently set the variable LD_LIBRARY_PATH in your sh/bash/zsh/csh/... config file or in system make.conf, and of course windows users can use its convenient interface. – oklas Sep 08 '22 at 12:06
20

Considering that /usr/lib/x86_64-linux-gnu/libproxy.so.1 is supplied by Ubuntu, let's assume that it is compatible with the system libstdc++ library. This means that the application is not actually using that system library, but some other version. I'd suggest to check if the application sets LD_LIBRARY_PATH and if there is another copy of libstdc++.so.6 on that path. In this case, try moving it away or deleting it—the application should then switch to the system library, which is newer and should be backwards-compatible.

Florian Weimer
  • 32,022
  • 3
  • 48
  • 92
  • 2
    I was using XAMPP on Ubuntu and I had the same problem. Renaming `libstdc++.so.6` to `libstdc++.so.6_old` did the trick. Thank you really much – Genarito Nov 29 '18 at 19:14
2

I also ran into this while installing h3. The answer by oklas helped me, but expanding on that answer. The gcc version with conda install -c anaconda gcc is 4.8.5. It is not compatible with the libstdc++.so.6.0.22. So I uninstalled it and installed a specific verision of gcc (ver 6) and it solved my problem.

sergej
  • 1,077
  • 1
  • 14
  • 20
  • 3
    This can be a comment instead of an answer. Please, read the rules. – dpapadopoulos Nov 18 '19 at 10:09
  • 1
    So, apparently, on this system, the correct gcc was already installed. A that was necessary was to add /usr/lib64 to LD_LIBRARY_PATH. It shouldn't be necessary to add it there. But after installng tensorflow and setting LD_LIBRARY_PATH to the location of tensorflow lib directory, it overrode the system path. – hellork Jan 28 '23 at 08:03
1

answer for lazy ppl this should fix situation in most cases

apt-get update && apt-get install sudo && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
sudo add-apt-repository ppa:george-edison55/cmake-3.x -y && \
sudo apt-get update && \
sudo apt-get install gcc-snapshot -y && \
sudo apt-get update && \
sudo apt-get install gcc-6 g++-6 -y && \
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6 && \
sudo apt-get install gcc-4.8 g++-4.8 -y && \
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8 && \
sudo update-alternatives --config gcc && \
sudo apt-get update && \
sudo apt-get install cmake -y;
Ill.forte
  • 11
  • 1