Package manager: Apt broken after upgrade

November 16, 2018 1.2k views
Initial Server Setup Linux Basics Ubuntu 18.04

After a recent upgrade apt returns the following error. How can I recover apt?

$ sudo apt-get update
apt-get: relocation error: /usr/lib/x8664-linux-gnu/ symbol _ZN9pkgSystem9LockInnerEv version APTPKG5.0 not defined in file with link time reference

Tried to rebuild using:


$ sudo dpkg -i {apt,libapt-pkg5.0}*.deb
dpkg: regarding apt
1.6.3ubuntu0.1_amd64.deb containing apt: apt breaks apt-transport-https (<< 1.5~alpha4~) apt-transport-https (version 1.2.29) is present and installed.

dpkg: error processing archive apt1.6.3ubuntu0.1amd64.deb (–install): installing apt would break apt-transport-https, and deconfiguration is not permitted (–auto-deconfigure might help)
(Reading database … 186145 files and directories currently installed.)
Preparing to unpack libapt-pkg5.01.6.3ubuntu0.1amd64.deb …
Unpacking libapt-pkg5.0:amd64 (1.6.3ubuntu0.1) over (1.6.3ubuntu0.1) …
Setting up libapt-pkg5.0:amd64 (1.6.3ubuntu0.1) …
Processing triggers for libc-bin (2.27-3ubuntu1) …
Errors were encountered while processing: apt1.6.3ubuntu0.1amd64.deb

Be the first one to answer this question.