Error loading shared libraries: libstdc++.so.6

6,446

You need to install corresponding packages manually by

wget http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-10/libstdc++6_10-20200411-0ubuntu1_i386.deb
sudo dpkg -i libstdc++6_10-20200411-0ubuntu1_i386.deb

wget http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-10/libstdc++6_10-20200411-0ubuntu1_amd64.deb
sudo dpkg -i libstdc++6_10-20200411-0ubuntu1_amd64.deb

and then you will be able to run

sudo apt update

and

sudo apt install --reinstall libstdc++6 libstdc++6:i386 libapt-pkg6.0
sudo apt install command-not-found apt-file
Share:
6,446

Related videos on Youtube

Jigyansha
Author by

Jigyansha

Updated on September 18, 2022

Comments

  • Jigyansha
    Jigyansha over 1 year

    When I use

    $apt-get update
    

    Output- error while loading shared libraries:libstdc++.so.6

    $apt-file search libstdc++.so.6
    File usr/lib/command not found 
    

    How can I add this library?


    $ lsb_release -a 
    No LSB modules are available. 
    Distributor ID: Ubuntu
    Description: Ubuntu 18.04.4 LTS 
    Release: 18.04 
    Codename: bionic
    
    $ apt-cache policy libapt-pkg?.0
    apt-cache: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /usr/lib/x86_64-linux-gnu/libapt-pkg.so.6.0) 
    
    • N0rbert
      N0rbert almost 4 years
      The main thing which I can't understand - why APT tries to locate libapt-pkg.so.6.0 from newer version of Ubuntu (20.04 LTS) rather than standart libapt-pkg.so.5.0. Did you tried to upgrade this system? Did this upgrade failed?
    • Jigyansha
      Jigyansha almost 4 years
      yes the system was upgraded and it was failed
    • N0rbert
      N0rbert almost 4 years
      It is a bit bad, that you did not mention it at start. See updated answer.
  • Jigyansha
    Jigyansha almost 4 years
    Sudo apt is not working
  • Jigyansha
    Jigyansha almost 4 years
    Sudo dpkg above gives error " package libstdc++6:amd64 8.4.0~18.04 cannot be configured because libstdc++6:i386 is at different version
  • N0rbert
    N0rbert almost 4 years
    See updated answer. Install 32-bit first, then 64-bit.
  • Jigyansha
    Jigyansha almost 4 years
    now after sudo apt update "apt: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /usr/lib/x86_64-linux-gnu/libapt-pkg.so.6.0)" this error is showing