0

I run "sudo apt-get update" and then "sudo apt-get upgrade" and it always hangs before it finishes.

I have a dd image so for each round below, I restore from the image. After it hangs on a specific package, I restore again, and enter the command 'sudo apt-mark hold ' to prevent it from being updated. But then it'll hang on another package. So frustrating!

Round #1:

...
Setting up dbus (...) ...
[hangs]

restore, reboot, and "sudo apt-mark hold dbus" for round #2.

Round #2:

...
Setting up console-setup (...) ...
[hangs]

restore, reboot, and "sudo apt-mark hold" dbus and console-setup for round #3.

Round #3:

Setting up libapt-inst2.0:amd64 (1.2.32) ...
Setting up apt-utils (1.2.32) ...
Setting up libtasn1-6:amd64 (4.7-3ubuntu0.16.04.3) ...
Setting up libgnutls30:amd64 (3.4.10-4ubuntu1.5) ...
Setting up libsasl2-modules-db:amd64 (2.1.26.dfsg1-14ubuntu0.1) ...
Setting up libsasl2-2:amd64 (2.1.26.dfsg1-14ubuntu0.1) ...
Setting up libldap-2.4-2:amd64 (2.4.42+dfsg-2ubuntu3.6) ...
Setting up dirmngr (2.1.11-6ubuntu2.1) ...
Setting up libgnutls-openssl27:amd64 (3.4.10-4ubuntu1.5) ...
Setting up libssl1.0.0:amd64 (1.0.2g-1ubuntu4.15) ...
[hangs]

Any advice on how to analyze the situation would be greatly appreciated.

5
  • Some background information would help. Such as output from lsb_release -a. Aug 17, 2019 at 3:36
  • $lsb_release -a| No LSB modules are available.| Distributor ID: Ubuntu| Description: Ubuntu 16.04.6 LTS| Release: 16.04| Codename: xenial|
    – chiwal
    Aug 17, 2019 at 5:24
  • try sudo apt update and sudo apt upgrade sometimes they provide more information. Aug 17, 2019 at 10:42
  • sudo apt update: pastebin.com/77A9hkrF |
    – chiwal
    Aug 17, 2019 at 16:18
  • sudo apt upgrade pastebin.com/55DzBxkQ hung at the dbus 'setting up' setp
    – chiwal
    Aug 17, 2019 at 16:18

1 Answer 1

0

This is a problem with the SD card that doesn't support the IO speed. I made a script that performs the upgrade without hanging:

for i in $(apt list --upgradable | cut -d/ -f1); do
    sudo apt-get -y install --only-upgrade $i
    sleep 10
done

You must log in to answer this question.

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