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 on1.4.6~17.04.1
libapt=pkg5.0:amd64
running on1.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
dpkg -l apt libapt-pkg5.0
to show your installed related package versions, andmd5sum /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:33868c9bb9cd23bacc2f76182902eb489d /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:54apt
version is actually from 17.04 and thelibapt-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 getapt
running again by manually downloading and installing the correct packages. Please download apt and libapt-pkg5.0 from the bionic-update repo and install them withsudo dpkg -i /PATH/TO/PACKAGE
– Byte Commander Feb 10 '19 at 13:23apt
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 ofgrep ^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