How report similar to current bug? apt bug symbol _ZN9pkgSystem9LockInnerEvdpkg vs _ZlsRSoRKN3APT9

Asked by MrMe01 on 2018-10-30

I have a different bug that is out there, and searchable, and I don't think anyone right now can apt get update on 16.04, it has happened on a fresh install in a VM from the mini.iso, so all currentlsystem files are up to date as the system is installed.

I am running the Zentyal stack of software on the machine,and on the Test VM, so I don't know what is at fault here, this person is in the exact same state as me,

Mine is

ZN9pkgSystem9LockInnerEvdpkg, and it is searchable for on Google, all recent posts, current bug on here is different and old, _ZlsRSoRKN3APT9

Maybe I was one of the first to notice this bug?

Here is the message I get, # apt
apt: relocation error: /usr/lib/x86_64-linux-gnu/ symbol _ZN9pkgSystem9LockInnerEv, version APTPKG_5.0 not defined in file with link time reference

Here's a link to the other post on this site, that is not the same bug,

Thanks for your time.

Question information

English Edit question
Ubuntu Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Manfred Hampl (m-hampl) said : #1

For diagnostic purposes please provide the output of the commands

uname -a
lsb_release -crid
apt-cache policy apt libapt-pkg5.0

MrMe01 (mrme02) said : #2

From my broken VM, actual box taken down for security reasons, unable to patch.

# uname -a
Linux 1604VM 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

# lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial

# apt-cache policy apt libapt-pkg5.0
apt-cache: relocation error: /usr/lib/x86_64-linux-gnu/ symbol _ZN9pkgSystem9LockInnerEv, version APTPKG_5.0 not defined in file with link time reference

Manfred Hampl (m-hampl) said : #4

Ok, the apt-cache command fails, maybe we receive the desired information in a different way:

What is the output of the commands

grep -A 15 'Package: apt$' /var/lib/dpkg/status
grep -A 15 'Package: libapt-pkg5.0$' /var/lib/dpkg/status
cat -n /etc/apt/sources.list

MrMe01 (mrme02) said : #5

# grep -A 15 'Package: apt$' /var/lib/dpkg/status
Package: apt
Status: install ok installed
Priority: important
Section: admin
Installed-Size: 3350
Maintainer: Ubuntu Developers <email address hidden>
Architecture: amd64
Version: 1.2.29
Replaces: bash-completion (<< 1:2.1-4.2+fakesync1), manpages-it (<< 2.80-4~), ma npages-pl (<< 20060617-3~), openjdk-6-jdk (<< 6b24-1.11-0ubuntu1~), sun-java5-jd k (>> 0), sun-java6-jdk (>> 0)
Depends: libapt-pkg5.0 (>= 1.2.29), libc6 (>= 2.15), libgcc1 (>= 1:3.0), libstdc ++6 (>= 5.2), init-system-helpers (>= 1.18~), ubuntu-keyring, gpgv | gpgv2, gnup g | gnupg2, adduser
Suggests: aptitude | synaptic | wajig, dpkg-dev (>= 1.17.2), apt-doc, python-apt
Breaks: apt-utils (<< 1.1.3), manpages-it (<< 2.80-4~), manpages-pl (<< 20060617 -3~), openjdk-6-jdk (<< 6b24-1.11-0ubuntu1~), sun-java5-jdk (>> 0), sun-java6-jd k (>> 0)
 /etc/apt/apt.conf.d/01-vendor-ubuntu 5232396660502461fc834c0a1229dbe4
 /etc/apt/apt.conf.d/01autoremove 735050108d38dbf99e933a9f647f6892
 /etc/cron.daily/apt-compat bc4a71cbcaeed4179f25d798257fa980

# grep -A 15 'Package: libapt-pkg5.0$' /var/lib/dpkg/status
Package: libapt-pkg5.0
Status: install ok installed
Priority: important
Section: libs
Installed-Size: 3001
Maintainer: Ubuntu Developers <email address hidden>
Architecture: amd64
Multi-Arch: same
Source: apt
Version: 1.5.1
Provides: libapt-pkg (= 1.5.1)
Depends: libbz2-1.0, libc6 (>= 2.15), libgcc1 (>= 1:3.0), liblz4-1 (>= 0.0~r127), liblzma5 (>= 5.1.1alpha+20120614), libstdc++6 (>= 5.2), libudev1 (>= 183), zlib1g (>= 1:
Recommends: apt (>= 1.5.1)
Breaks: appstream (<< 0.9.0-3~), apt (<< 1.1~exp14), libapt-inst1.5 (<< 0.9.9~)
Description: package management runtime library
 This library provides the common functionality for searching and

This last line ends like that.

# cat -n /etc/apt/sources.list
     1 # deb xenial main restricted
     3 # deb xenial-updates main restricted
     4 # deb xenial-security main restricted
     6 # See for how to upgrade to
     7 # newer versions of the distribution.
     8 deb xenial main restricted
     9 # deb-src xenial main restricted
    11 ## Major bug fix updates produced after the final release of the
    12 ## distribution.
    13 deb xenial-updates main restricted
    14 # deb-src xenial-updates main restricted
    16 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    17 ## team. Also, please note that software in universe WILL NOT receive any
    18 ## review or updates from the Ubuntu security team.
    19 deb xenial universe
    20 # deb-src xenial universe
    21 deb xenial-updates universe
    22 # deb-src xenial-updates universe
    24 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    25 ## team, and may not be under a free licence. Please satisfy yourself as to
    26 ## your rights to use the software. Also, please note that software in
    27 ## multiverse WILL NOT receive any review or updates from the Ubuntu
    28 ## security team.
    29 deb xenial multiverse
    30 # deb-src xenial multiverse
    31 deb xenial-updates multiverse
    32 # deb-src xenial-updates multiverse
    34 ## N.B. software from this repository may not have been tested as
    35 ## extensively as that contained in the main release, although it includes
    36 ## newer versions of some applications which may provide useful features.
    37 ## Also, please note that software in backports WILL NOT receive any review
    38 ## or updates from the Ubuntu security team.
    39 deb xenial-backports main restricted universe multi verse
    40 # deb-src xenial-backports main restricted universe multiverse
    42 ## Uncomment the following two lines to add software from Canonical's
    43 ## 'partner' repository.
    44 ## This software is not part of Ubuntu, but is offered by Canonical and the
    45 ## respective vendors as a service to Ubuntu users.
    46 # deb xenial partner
    47 # deb-src xenial partner
    49 deb xenial-security main restricted
    50 # deb-src xenial-security main restricted
    51 deb xenial-security universe
    52 # deb-src xenial-security universe
    53 deb xenial-security multiverse
    54 # deb-src xenial-security multiverse
    56 #zentyal
    57 deb 5.1 main

Manfred Hampl (m-hampl) said : #6

This seems not to be an Ubuntu problem, but most probably is caused by zentyal.

In Ubuntu xenial the packages apt and libapt-pkg5.0 are built from the same source (apt version 1.2.29).

The zentyal repository provides libapt-pkg5.0 version 1.5.1 which apparently conflicts with apt 1.2.29

My suggestion:
Manually download and install the original version of libapt-pkg5.0 from the Ubuntu repositories.

sudo dpkg --install --force-downgrade libapt-pkg5.0_1.2.29_amd64.deb

Remark: If that works, you have to prevent that the libapt-pkg5.0 package gets updated to the version form zentyal again (e.g. by apt-pinning).

Manfred Hampl (m-hampl) said : #7

Maybe the same is valid for libapt-inst2.0, and the following commands might be required as well:

sudo dpkg --install --force-downgrade libapt-inst2.0_1.2.29_amd64.deb

MrMe01 (mrme02) said : #8

Just ran apt update and apt upgrade with the commands of your first message with success,
sudo dpkg --install --force-downgrade libapt-pkg5.0_1.2.29_amd64.deb

My VM appears to be up to date.

Do I need to run the second set of commands or should I leave it as is?

MrMe01 (mrme02) said : #9

Just rebooted, apt update, apt upgrade, libapt-pkg5.0 held back, I think this has fixed the issue for now, thank you Manfred :-)

MrMe01 (mrme02) said : #10

Seems to be all working as expected.

Markus Neubauer (mn-ubuntu) said : #11

Can be closed -> answers in bug #1644643

Nelson Range (questor3030) said : #12

Same cause, Zentyal upgraded to newer APT package, solution described resolves the issue.