1

I am using Ubuntu 20.04 and having dual boot.

While uninstalling the gcc package, I mistakenly uninstalled ubuntu-desktop and libstdc++.so.6 packages. Now I am facing this black screen when I boot on Try Ubuntu.

I tried with Ubuntu recovery option. In there, I tried giving the broken package in dpkg, but I am getting this error:

Traceback (most recent call last):
  File "/usr/lib/python3/disc-packages/DistUpgrade/disp-upgrade.py", line 3, in <module>
    from DistUpgradeMain import main
  File "/usr/lib/python3/disc-packages/DistUpgrade/DistUpgradeMain.py", line 22, in <module>
    import apt
  File "/usr/lib/python3/disc-packages/apt/__init__.py", line 23, in <module>
    import apt_pkg
ImportError: libstdC++.so.6: cannot open shared object file: No such file or directory.

Error Screenshot

1 Answers1

0

Re-install

Is this a brand new or recent install? The simplest thing would be to backup your user data from terminal and install ubuntu from scratch.

I think the installer would also detect that there is an older version and offer to keep user data (only the home directories) when doing a reinstall from a disk, an image(for virtual machines) or USB.

This would be the simplest solution.

Download libstdC++.so.6 Debian Package

As explained here, you could possibly download the Debian package and do a manual install:

wget http://launchpadlibrarian.net/270880798/libstdc++6_5.4.0-6ubuntu1~16.04.1_i386.deb
sudo dpkg -i libstdc++6_5.4.0-6ubuntu1~16.04.1_i386.deb

Then reboot. The apt command should be working and you could reinstall ubuntu-desktop package.

Copy the library from another Ubuntu install

This is what I would have done as I always have multiple systems with Ubuntu runing in my house. I will let you read on the details here.

Hope you find a solution!

Torrien
  • 835