0

while running sudo apt-get install packagename i got this error. apt-get: /lib/i386-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /usr/lib/i386-linux-gnu/libapt-pkg.so.5.0)

The output of " cat /etc/apt/sources.list" is:
deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse

while running dpkg -l libapt*

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
un  libapt-inst    <none>       <none>       (no description available)
ii  libapt-inst1.4 0.8.16~exp12 i386         deb package format runtime librar
rc  libapt-inst1.5 1.0.1ubuntu2 i386         deb package format runtime librar
ii  libapt-inst2.0 1.6.6        i386         deb package format runtime librar
un  libapt-pkg     <none>       <none>       (no description available)
ii  libapt-pkg-per 0.1.33build1 i386         Perl interface to libapt-pkg
ii  libapt-pkg4.12 1.0.1ubuntu2 i386         package management runtime librar
ii  libapt-pkg5.0: 1.7.0ubuntu0 i386         package management runtime librar

cat /etc/lsb-release
DISTRIB_ID=Ubuntu DISTRIB_RELEASE=18.04 DISTRIB_CODENAME=bionic DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"

0

You have 16.04 repository set in your sources.list file.

I suggest to remove that file by

sudo rm /etc/apt/sources.list

Then run

software-properties-gtk

and check there repositories like main, universe, etc.

That should create a new sources.list file with bionic reposiories instead of xenial.

Another way is to run sudo nano /etc/apt/sources.list

and paste there this text

deb http://archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse  
deb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu bionic-security main restricted universe multiverse

Then save it by Ctrl+O and exit by Ctrl+X.

Run sudo apt update.

  • I fear this may run deeper than that - the version of libapt_pkg5.0 that is running, is from cosmic – Charles Green Feb 22 at 17:10
  • deleted the sources.list file.but for the second command i got the same error. – ANUSHA GEORGE Feb 22 at 17:10
  • Yeah, but we can at least start from here. Then we can see. – Pilot6 Feb 22 at 17:11
  • ubuntu:~$ software-properties-gtk Traceback (most recent call last): File "/usr/lib/command-not-found", line 28, in <module> from CommandNotFound import CommandNotFound File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 19, in <module> from CommandNotFound.db.db import SqliteDatabase File "/usr/lib/python3/dist-packages/CommandNotFound/db/db.py", line 5, in <module> import apt_pkg ImportError: /lib/i386-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /usr/lib/i386-linux-gnu/libapt-pkg.so.5.0) – ANUSHA GEORGE Feb 22 at 17:11
  • See the update. There is another way of fixing it. – Pilot6 Feb 22 at 17:15

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.