1

I am currently using the following version of ubuntu Description: Ubuntu 18.04.5 LTS Release: 18.04 Codename: bionic On this machine I am trying to remove an existing maven plugin using sudo apt-get autoremove maven

I am getting the following error: -

Reading package lists... Done Building dependency tree
Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: libc6-dbg : Depends: libc6 (= 2.27-3ubuntu1.4) but 2.27-3ubuntu1 is to be installed libc6-dev : Depends: libc6 (= 2.27-3ubuntu1.4) but 2.27-3ubuntu1 is to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Then I tried this as suggested sudo apt --fix-broken install

Reading package lists... Done Building dependency tree
Reading state information... Done Correcting dependencies... Done The following package was automatically installed and is no longer required: libllvm7 Use 'sudo apt autoremove' to remove it. The following additional packages will be installed: libc6 libc6:i386 Suggested packages: glibc-doc glibc-doc:i386 locales:i386 The following packages will be upgraded: libc6 libc6:i386 2 upgraded, 0 newly installed, 0 to remove and 428 not upgraded. 9 not fully installed or removed. Need to get 0 B/5,382 kB of archives. After this operation, 19.5 kB of additional disk space will be used. Do you want to continue? [Y/n] Y debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable (Reading database ... 197197 files and directories currently installed.) Preparing to unpack .../libc6_2.27-3ubuntu1.4_amd64.deb ... De-configuring libc6:i386 (2.27-3ubuntu1) ... debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable dpkg: error processing archive /var/cache/apt/archives/libc6_2.27-3ubuntu1.4_amd64.deb (--unpack): new libc6:amd64 package pre-installation script subprocess returned error exit status 1 Preparing to unpack .../libc6_2.27-3ubuntu1.4_i386.deb ... De-configuring libc6:amd64 (2.27-3ubuntu1) ... debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable dpkg: error processing archive /var/cache/apt/archives/libc6_2.27-3ubuntu1.4_i386.deb (--unpack): new libc6:i386 package pre-installation script subprocess returned error exit status 1 Errors were encountered while processing: /var/cache/apt/archives/libc6_2.27-3ubuntu1.4_amd64.deb /var/cache/apt/archives/libc6_2.27-3ubuntu1.4_i386.deb E: Sub-process /usr/bin/dpkg returned an error code (1)

I am novice to ubuntu and I dont know how to approach this. Please tell me how to tackle this.

2 Answers 2

1

In my case, I had the same error when installing python3-pip (apt install python3-pip)

If you check closer the error, you are trying to upgrade libc6 libc6:i386, so to fix the error, what you can do is to avoid those upgrades.

I've done it like this:

apt-mark hold libc6
apt-mark hold libc6:i386
yes | apt install python3-pip --no-upgrade libc6 libc6:i386
0

Open the terminal and type:

sudo fuser -v /var/cache/debconf/config.dat

This will show you what process is holding the lock:

                     USER        PID ACCESS COMMAND
/var/cache/debconf/config.dat:
                     root      12590 F.... dpkg-preconfigu

Note down the PID and kill it with sudo kill PID or sudo kill -9 PID which in this example is 12590.

1
  • Thanks a lot Karel, this really helped.
    – Teja M
    Commented Dec 20, 2020 at 21:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .