3

My apt will not run any command, e.g. sudo apt-get ____. The error message I am getting is:

relocation error: /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0: 
   symbol _ZN13pkgSourceList16AddVolatileFilesER11CommandLinePSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EE 
   version APTKG_5.0 not defined in file libapt-pkg.so.5.0 with link time reference

I only have access to recovery mode and Cntrl+Alt+F1 can someone please help me?


Update 1:

I am running Ubuntu 18.04, bionic.

dpkg -l apt libapt-pkg5.0 shows:

  • apt running on 1.4.6~17.04.1
  • libapt=pkg5.0:amd64 running on 1.2.29

The file hashes:

868c9bb9cd23bacc2f76182902eb489d /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0
12e8c8000ae4f61d6ec50ca9218b428d /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0
Byte Commander
  • 105,631
  • 46
  • 284
  • 425
  • related: https://askubuntu.com/q/777803/367990 and https://askubuntu.com/q/448575/367990 - you seem to have a corrupted or incompatible shared library there. Can you check `dpkg -l apt libapt-pkg5.0` to show your installed related package versions, and `md5sum /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0 /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0` to show the hash of those two library files, so that we can compare if one is corrupt. Also please add what Ubuntu release you're using. – Byte Commander Feb 09 '19 at 19:33
  • @ByteCommander I am sorry for my late response, I am running Ubuntu 18.04, bionic. dpkg -l apt libapt-pkg5.0 shows the following Apt running on- 1.4.6~17.04.1 libapt=pkg5.0:amd64 running on- 1.2.29 868c9bb9cd23bacc2f76182902eb489d /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0 12e8c8000ae4f61d6ec50ca9218b428d /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0 – Anonymous__15 274 Feb 10 '19 at 01:54
  • Alright, you have two completely wrong package versions for your Ubuntu release there. That `apt` version is actually from 17.04 and the `libapt-pkg5.0` is from 16.04, no surprise that doesn't work together. As a first step to fix your issue, we'll try to get `apt` running again by manually downloading and installing the correct packages. Please download [apt](https://packages.ubuntu.com/bionic-updates/amd64/apt/download) and [libapt-pkg5.0](https://packages.ubuntu.com/bionic-updates/amd64/libapt-pkg5.0/download) from the bionic-update repo and install them with `sudo dpkg -i /PATH/TO/PACKAGE` – Byte Commander Feb 10 '19 at 13:23
  • Once `apt` is functional again, we need to investigate why you had these invalid versions installed, where they came from and whether there are more bad versions. Please [edit] your question and add the output of `grep ^deb /etc/apt/sources.list{,.d/*.list}` to list all your configured software sources. Don't paste the output in a comment, as that will not preserve any formatting and make it hard to read. – Byte Commander Feb 10 '19 at 13:25

0 Answers0