apt failed to run due to link time reference error

Bug #1644643 reported by zhiting zhu on 2016-11-24
This bug affects 6 people
Affects Status Importance Assigned to Milestone
apt (Ubuntu)

Bug Description

After update apt and its related library to 1.2.15 from 1.2.10ubuntu1, I get following message when I try to invoke apt:

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

1.2.10 do not have this problem. Now I manually downgrade from 1.2.15 to 1.2.10 to solve this problem.

Ubuntu release:
Description: Ubuntu 16.04.1 LTS
Release: 16.04

what I expect to happen: apt would show the helper message
what happened instead: apt shows me the line on above

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in apt (Ubuntu):
status: New → Confirmed
Yaroslav (psychozoic) wrote :

is there any way to fix it?

MrMe01 (mrme02) wrote :

I guess it's either wait for instructions or to downgrade as the original poster did. I have no idea on how to downgrade.

Yaroslav (psychozoic) wrote :

ok, i fixed it replacing /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0.0 from another Ubuntu 16.04 installation.

Julian Andres Klode (juliank) wrote :

apt 1.2.15ubuntu0.2 properly depends on libapt-pkg5.0 (>= 1.2.15ubuntu0.2), so assuming that this apt is installed, and the system is not broken, this must be working (as it passed verification).

In any case, this bug is incomplete, as it does not clearly mention which versions of apt, libapt-pkg5.0 are installed.

Changed in apt (Ubuntu):
status: Confirmed → Incomplete
Julian Andres Klode (juliank) wrote :

Downgrading libapt-private especially should not make a difference, as it's in the same package as apt.

Tobias (tobst4r) wrote :

The problem occured after upgrading to:

libapt-pkg5.0:amd64 (1.5.1)
apt (1.2.29)

It works well wit apt 1.2.10 and libapt 1.2.10

Julian Andres Klode (juliank) wrote :

So, 1.5.1 is from artful (and that's EOL), and 1.2.29 is from xenial. Partial upgrades are not supported. I suggest you find some help returning your system to xenial, such as forums, mailing lists, or IRC.

Tobias (tobst4r) wrote :

For me it works after installing apt 1.2.9 and libapt-pkg5.0_1.2.29_amd64.deb
When i now run apt update && apt upgrade, it tells me that libapt-pkg5.0 was kept back.

If i now run apt install -f it will install libapt-pkg5.0:amd64 (1.5.1)

Julian Andres Klode (juliank) wrote :

I do not believe that apt 1.2.29 with libapt-pkg5.0 1.5.1 fails with that error, btw. I believe it fails with:

symbol _ZN9pkgSystem9LockInnerEv version APTPKG_5.0 not defined in file libapt-pkg.so.5.0 with link time reference

Which is expected (since 1.2.29 gained a new frontend locking symbol), and brings us back to the point of partial upgrades not being supported.

Julian Andres Klode (juliank) wrote :

tobst4r, then your system is broken. You are mixing artful and xenial, which is not a supported thing to do.

Julian Andres Klode (juliank) wrote :

So for anyone affected by this bug:

1. Make sure it actually is this bug (mentions precisely _ZlsRSoRKN3APT9PrettyPkgE, not another mangled name)
2. Provide output of apt-cache policy apt libapt-pkg5.0

MrMe01 (mrme02) wrote :

Julian, I get something similar, but different.
"# apt
apt: 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"

apt-cache policy is the same, and so is apt libapt-pkg5.0.

What can I do to rectify this? I started asking on reddit, got redirected to askubuntu, and someone pointed me to this page, I was the one who confirmed it, as I experienced the same or similar issues.

I am contemplating reinstalling as using the same install media in a VM (mini.iso) resulted in a working state, and apt functions as expected, so I doubt the .deb files are the issue here, more likely the state of apt on my box.

Markus Neubauer (mn-ubuntu) wrote :

The Problem occured also using a Zentyal 5.1 community version:
A workaround is here https://forum.zentyal.org/index.php/topic,32403.msg109031.html#msg109031

MrMe01 (mrme02) wrote :

Try these commands,
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

Julian Andres Klode (juliank) wrote :

MrMe01 wrote:
> apt-cache policy is the same, and so is apt libapt-pkg5.0.

The same as what?

> What can I do to rectify this?

It depends on what you have installed. But generally, you have mixed two Ubuntu versions on one system, so you have to make sure to upgrade or downgrade packages so you only have packages installed from one version; and then remove the sources.list entry for the other.

apt list can help you figure out which packages are wrong.

In any case, this is the wrong place for this, as I mentioned before.

Markus Neubauer (mn-ubuntu) wrote:
> The Problem occured also using a Zentyal 5.1 community version

Again, that's not the problem this bug is about, and if they want to build their distribution by mixing Ubuntu releases; again, that's not supported.

Markus Neubauer (mn-ubuntu) wrote :

#15 ...and dont forget to hold the package or will run in the same situation each update process, see link in #14

Manfred Hampl (m-hampl) wrote :

The root cause of this problem is Zentyal who provide an updated version of libapt-pkg5.0 in their repositories (version 1.5.1), but no updated version of the apt package (which will be taken from the Ubuntu repositories, currently version 1.2.29). These two packages do not fit together.

Workaround: downgrade libapt-pkg5.0 to the Ubuntu version (and mark that package not to be updated to the Zentyal version again)

Long term solution proposal: Zentyal have to reassess and correct the contents of their repositories.

Julian Andres Klode (juliank) wrote :

I have contacted Zentyal and asked them to stop doing that. By having the old 1.5 version from artful, zentyal users are missing out on important bug and security fixes.

MrMe01 (mrme02) wrote :

Thank you for your work here, much appreciated :-)

Markus Neubauer (mn-ubuntu) wrote :

#18 agreed
#19 Thanx

Launchpad Janitor (janitor) wrote :

[Expired for apt (Ubuntu) because there has been no activity for 60 days.]

Changed in apt (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers