By Christian L
After a recent upgrade apt returns the following error. How can I recover apt?
$ sudo apt-get update apt-get: relocation error: /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0: symbol _ZN9pkgSystem9LockInnerEv version APTPKG_5.0 not defined in file libapt-pkg.so.5.0 with link time reference
Tried to rebuild using:
apt_1.6.3ubuntu0.1_amd64.deb libapt-pkg5.0_1.6.3ubuntu0.1_amd64.deb
$ 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 apt_1.6.3ubuntu0.1_amd64.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.0_1.6.3ubuntu0.1_amd64.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: apt_1.6.3ubuntu0.1_amd64.deb
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello,
You could try using the following commands to reinstall libapt:
wget https://launchpad.net/ubuntu/+archive/primary/+files/libapt-pkg5.0_1.2.29_amd64.deb
sudo dpkg --install --force-downgrade libapt-pkg5.0_1.2.29_amd64.deb
Or you could try by replacing /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0.0 from another Ubuntu installation.
Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.