libstdc++.so.6: version `GLIBCXX_3.4.20' not found - ubuntu-16.04

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

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

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 ...

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.

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.

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;

Related

I couldn't upgrade my raspberry pi python version from 3.7 to 3.9

Please help me.
i have try out alot of way to get install, upgrade my python3.7 to python3.9 yet it keep shows up error.
sudo apt-get install python3
(Python3 is already the newest version [3.7.3-1])
sudo apt-get upgrade python3
(Python3 is already the newest version [3.7.3-1])
sudo add-apt-repository ppa:deadsnakes/ppa
(file "/user/bin/add-apt-repository", line 95, in )
(sp = SoftwareProperties(options=options)
(....)
(Error: could not find a distribution template for Raspbian/buster)
sudo apt-get install build-essential python-dev libsqlite3-dev libreadline6-dev libgdbm-dev zlib1g-dev libbz2-dev sqlite3 zip
(after install 2 newly package)
sudo apt-get install python3 python3-dev
(still back to python3.7)
anyone know how to make it to python3.9?
you have to type this in terminal:
sudo apt install python3.9
but you never can upgrade your Linux python to a newer version. It is internal.
but you can install python3.9 and use virtualenv to use your code in python3.9

Error while installing Omnet++ on Ubuntu 16.04 : Cannot find osgEarth

I followed the installation guide and installed all the packages mentioned. However, I end up with this error message while running ./configure
checking for osgEarth with CFLAGS=" -fPIC -fno-stack-protector " LIBS=" -losgEarth -losgEarthUtil"... no
configure: error: Cannot find osgEarth 2.7 or later. Set WITH_OSGEARTH=no in configure.user to disable this feature or install an up to date version of osgEarth.
Here is a link to my config.log file : config.log
Cannot find osgEarth 2.7 or later
osgearth 2.7 for Ubuntu 16.04 → https://launchpad.net/~ubuntugis/+archive/ubuntu/ppa →
sudo add-apt-repository ppa:ubuntugis/ppa
sudo apt update
sudo apt install libosgearth-dev // you get "2.7"
// All prerequisites :
sudo apt install g++ libxml2-dev libosgearth-dev bison flex clang swig libqt5opengl5-dev qt5-qmake openjdk-8-jre libopenmpi-dev tcl8.5-dev tk8.5-dev
Installing the libgeos-dev package, and then editing the configure.user file in my OMnet++ source directory solved my problem.
$ sudo apt-get install libgeos-dev
Change the line #OSGEARTH_LIBS= to this:
OSGEARTH_LIBS=" -losgEarth -losgEarthUtil -lgeos_c "
Make sure to remove the # in the beginning.
Now run:
$ . setenv
$ ./configure
And it should work..
Others have also faced this problem before and have the fix mentioned here solved their issues:
http://gmt.soest.hawaii.edu/boards/1/topics/4621
https://trac.osgeo.org/postgis/changeset/11363
Answered by Attila Török on the omnetpp google group (omnetpp#googlegroups.com)

How to upgrade Visual Studio Code editor?

What's the best way to upgrade Visual Studio Code on Linux Ubuntu?
For the time being I was periodically getting the newest version (.deb) from their official site: https://code.visualstudio.com/
sudo dpkg -i code_*.deb
Visual Studio Code enabled official Linux repositories on February 2017 (v1.10)
sudo add-apt-repository -y "deb https://packages.microsoft.com/repos/vscode stable main "
sudo apt update
sudo apt -y install code
You can upgrade / dist-upgrade as usual
sudo apt -y upgrade
sudo apt -y dist-upgrade
[1]: download the latest vscode (.deb) package to your computer on this
link :
https://go.microsoft.com/fwlink/?LinkID=760868
, or this there :
https://code.visualstudio.com/docs/
[2]: then open a terminal in the folder where you downloaded the .deb file and write:
sudo dpkg -i <the downloaded file>.deb
[3]: finally if you have apt-get do (if not install apt-get first):
sudo apt-get install -f
If you have installed it via the repository, exit VS Code then just do:
sudo apt update
sudo apt install code
This is the same command to install or upgrade to the latest version. You can see the version with:
code --version
Now the easiest and recommended way is to use snap:
sudo snap install --classic code
And updates are supposed to be automatic.
This works fine in ubuntu.
sudo apt-get update
sudo apt-get install code
When you install VSCode with the file .deb on Ubuntu 20.08, first, remove it:
sudo apt-get remove code
Add the repository in this link https://code.visualstudio.com/docs/setup/linux
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -o root -g root -m 644 packages.microsoft.gpg /etc/apt/trusted.gpg.d/
sudo sh -c 'echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/packages.microsoft.gpg] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
Udate the package cache and reinstall
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install code
In the next time when you want to upgrade, just do:
sudo apt-get update
sudo apt-get upgrade code
Because your repository is missing information to upgrade VSCode, the above solution will fix it.
This is what I did to avoid the annoying message:
Remove vscode, if you already installed it.
sudo apt-get remove code
Add repositories, update and install:
sudo add-apt-repository -y "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main "
sudo apt update
sudo apt -y install code
If you have already installed VS code, go to the terminal and type two different commands:
sudo apt update
sudo apt-get upgrade code
The following commands work for me (for Linux) :
wget 'https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64' -O /tmp/code_latest_amd64.deb
sudo dpkg -i /tmp/code_latest_amd64.deb
Place those two commands into an executable Bash script called auto-update-VSCode, and you can simply run that from your shell any time Visual Studio Code says it's out of date.
I'm running Ubuntu 20.04 and this worked perfectly for me:
$ wget https://vscode-update.azurewebsites.net/latest/linux-deb-x64/stable -O /tmp/code_latest_amd64.deb
$ sudo dpkg -i /tmp/code_latest_amd64.deb
Best way to update Vscode in Ubuntu:
sudo apt-get update
sudo apt-get install code
sudo apt-get update
sudo apt-get install code

Install older versions of postgres(7.x or 8.x) in ubuntu

I can only find installations for the latest stable version. Can someone provide me steps to install an older version of pg?
Thanks
Sithara
I've installed Postgresql 8.4 on Ubuntu 16.4 using the following:
#Requirements
sudo apt-get install make
sudo apt-get install gcc
sudo apt-get install libreadline6 libreadline6-dev
sudo apt-get install zlib1g-dev
sudo apt-get install bison
#Download postgres
wget https://ftp.postgresql.org/pub/source/v8.4.22/postgresql-8.4.22.tar.gz
tar xfz postgresql-8.4.22.tar.gz
cd postgresql-8.4.22
#Installation
./configure
make
su
make install
adduser postgres
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test
Look for documentation in order to install other version, in this case I've checked:
https://www.postgresql.org/docs/8.4/static/install-short.html
One of possible ways is to install the required version of PostgreSQL from sources. Go to https://www.postgresql.org/ftp/source/. Download the required sources. And follow the instructions here
https://www.postgresql.org/docs/current/static/installation.html
It shouldn't be difficult.
Probably you should consider running sudo checkinstall instead of make install in order to be able to uninstall the package in a clean way. Package 'checkinstall' must be installed separately.

Using Kivy on Eclipse Indigo, Ubuntu 10.04 & Python 2.7

I would like to use Kivy on Eclipse Indigo on Ubuntu 10.04. I understand that python 2.7 is required (2.6 is the default on 10.04) and have python 2.7 installed as well. I've done lots of research but not found an answer. Can I do this and if so how? I don't want to upgrade ubuntu nor Eclipse since this would probably destabilise existing developments.
Kivy and Eclipse are not related, and Eclipse is not necessary for running or editing Kivy programs. I can help to answer the Kivy part of your question, and will leave Eclipse to others.
Since Ubuntu 10.04 is out of support, it's hard to tell which required system packages are not available. This will probably be the most tedious part of the process. For Kivy on Ubuntu 12.04 you need:
sudo apt-get install -y build-essential mercurial git python2.7 python-dev ccache ffmpeg libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsmpeg-dev libsdl1.2-dev libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev zlib1g-dev unzip
Some of those packages will have different versions on Ubuntu 10.04. Hopefully they are all available in some form.
Next you need to bootstrap an up-to-date Python setuptools environment:
sudo apt-get remove --purge -y python-virtualenv python-pip python-setuptools
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | sudo python2.7
rm -f setuptools*.zip
sudo easy_install-2.7 -U pip
Now you can install an up-to-date Cython:
sudo apt-get remove --purge -y cython
sudo pip2.7 install -U cython
Next you can install an up-to-date NumPy, which is required for PyGame:
sudo apt-get remove --purge -y python-numpy
sudo pip2.7 install -U numpy
Now you can install an up-to-date PyGame:
sudo apt-get remove --purge -y python-pygame
hg clone https://bitbucket.org/pygame/pygame
cd pygame
python2.7 setup.py build
sudo python2.7 setup.py install
cd ..
sudo rm -rf pygame
Now that all of the dependencies are met, you can install an up-to-date Kivy:
sudo apt-get remove --purge -y python-kivy
sudo pip install -U kivy