4

I am trying to execute apt-get update && apt-get upgrade on an Ubuntu 20.04 system:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.1 LTS
Release:        20.04
Codename:       focal

It get stuck with:

Extracting templates from packages: 100%
Preconfiguring packages ...
Setting up base-files (11ubuntu5.2) ...

Can only kill apt and dpkg from ps aux:

root@system:~# ps aux | grep apt
root     2850470  0.1  0.0  65660 58488 pts/6    S+   13:33   0:01 apt-get upgrade

root@system:~# ps aux | grep dpkg
root     2865414  0.0  0.0   7752  4140 pts/10   Ss+  13:33   0:00 /usr/bin/dpkg --status-fd 43 --no-triggers --configure base-files:amd64
root     2865415  0.0  0.0   2608  1860 pts/10   S+   13:33   0:00 /bin/sh /var/lib/dpkg/info/base-files.postinst configure 11ubuntu5.1

Running dpkg --configure -a behaves in the same way (gets stuck). If I remove the files from /var/lib/dpkg/updates, I can try to reinstall, but then I get:

E: Internal Error, No file name for base-files:amd64
E: Internal Error, No file name for man-db:amd64

Fixing Internal error - I need to force remove the packet from dpkg, not sure about that since these are system packets.

Can you please point me in the right direction on how to get the system upgraded?

1 Answer 1

0

A good advice was given in this thread, i.e. add set -x just below the set -e command in /var/lib/dpkg/info/base-files.postinst. When you rerun the dpkg reconfiguration, it will print all the to-be-run commands to the terminal. The last command before the hang is the problematic one.

1
  • Thank you, it's good to know if I ever stumble upon the issue again. I finally reinstalled the storage from scratch and was able to do subsequent updates after that. Commented Jun 23, 2021 at 13:18

You must log in to answer this question.

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