3

When trying to update I get an error message

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. 

But when I try to run this command the screen goes completely black and nothing happens. From what I can tell it is trying to install Linux headers when this happens. This is a fresh install of less than a week old. At this time I can not install anything new or update anything. How do I solve this issue?

Log File:

12:50:16 systemd-journal: Journal stopped
12:50:16 kernel: Sending SIGTERM to remaining processes...
12:50:16 kernel: Syncing filesystems and block devices.
12:50:16 kernel: printk: systemd-shutdow: 78 output lines suppressed due to ratelimiting
12:50:16 systemd: Shutting down.
12:50:15 NetworkManager: <info>  [1565373015.4510] exiting (success)
12:50:15 systemd: Stopped Raise network interfaces.
12:50:15 NetworkManager: <info>  [1565373015.4124] caught SIGTERM, shutting down normally.
12:50:15 systemd: Stopping Network Manager...
12:50:15 pulseaudio: E: [alsa-sink-HDMI 1] alsa-sink.c: Error opening PCM device hdmi:0,1: No such file or directory
12:50:15 systemd: Stopped D-Bus User Message Bus.
12:50:15 systemd-logind: Removed session 2.
12:50:15 systemd: Stopping D-Bus User Message Bus...
12:50:15 gdm-x-session: (II) Server terminated successfully (0). Closing log file.
12:50:14 systemd: Stopped ACPI event daemon.
12:50:14 (sd-pam): pam_unix(systemd-user:session): session closed for user gdm
12:50:14 systemd: gdm.service: Succeeded.
12:50:14 gdm3: Child process -1517 was already dead.
12:50:14 systemd: Started Exit the Session.
12:50:14 gdm3: Child process -1517 was already dead.
12:50:14 systemd: systemd-exit.service: Succeeded.
12:50:14 gdm-x-session: (II) systemd-logind: releasing fd for 13:65
12:50:14 systemd: Stopped sandboxed app permission store.
12:50:14 systemd-logind: Removed session c2.
12:50:14 gdm-x-session: (II) systemd-logind: releasing fd for 13:64
12:50:14 systemd: Stopping User Manager for UID 123...
12:50:14 gdm-x-session: (II) Server terminated successfully (0). Closing log file.
12:50:13 gdm3: Freeing conversation 'gdm-launch-environment' with active job
12:50:13 systemd: Stopped Network Manager Wait Online.
12:50:13 dbus-daemon: [system] Activation via systemd failed for unit 'accounts-daemon.service': Refusing activation, D-Bus is shutting down.
12:50:13 systemd: Stopped target Network is Online.
12:50:13 gdm3: Tried to look up non-existent conversation gdm-launch-environment
12:50:13 gdm-x-session: (II) systemd-logind: releasing fd for 13:68
12:50:13 avahi-daemon: avahi-daemon 0.7 exiting.
12:50:13 dbus-daemon: [system] Activating via systemd: service name='org.freedesktop.Accounts' unit='accounts-daemon.service' requested by ':1.478' (uid=0 pid=3680 comm="gdm-session-worker [pam/gdm-launch-environment] " label="unconfined")
12:50:13 systemd: Stopped CUPS Scheduler.
12:50:13 gdm3: Failed to list cached users: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name :1.7 was not provided by any .service files
12:50:13 systemd: Stopped PackageKit Daemon.
12:50:13 udisksd: udisks daemon version 2.8.2 exiting
12:50:13 systemd: Stopped Accounts Service.
12:50:13 apport:    ...done.
12:50:13 systemd: Stopped LSB: Record successful boot for GRUB.
12:50:13 dbus-daemon: [session uid=1000 pid=3647] AppArmor D-Bus mediation is enabled
12:50:13 systemd: Stopping Authorization Manager...
12:50:13 avahi-daemon: Leaving mDNS multicast group on interface lo.IPv4 with address 127.0.0.1.
12:50:13 systemd: Stopped target Host and Network Name Lookups.
12:50:13 avahi-daemon: Leaving mDNS multicast group on interface enp7s0.IPv4 with address 192.58.0.150.
12:50:13 systemd-logind: Session c2 logged out. Waiting for processes to exit.
12:50:13 systemd: Stopping CUPS Scheduler...
12:50:13 avahi-daemon: Leaving mDNS multicast group on interface enp7s0.IPv6 with address fe80::fd7:6a47:d5ba:6c3c.
12:50:13 systemd-logind: Session 2 logged out. Waiting for processes to exit.
Raffa
  • 32,237
  • It appears you have NVIDIA drivers installed. This might explain the blank screen. I would recommend purging the NVIDIA drivers following these instructions https://askubuntu.com/questions/1163516/problems-with-booting-the-system/1163539#1163539 first and then try the recovery repair Option # 2 listed here. – Raffa Aug 09 '19 at 18:38

1 Answers1

4

I would suggest the following:

Option # 1:

Try fixing the missing packages by running the following command in the terminal:

sudo dpkg --configure -a && sudo apt update --fix-missing && sudo apt install -f && sudo apt full-upgrade

If errors are encountered, try removing the the apt lock by running the following in the terminal:

sudo rm /var/lib/apt/lists/lock

Then:

sudo rm /var/cache/apt/archives/lock

Then run the command again:

sudo dpkg --configure -a && sudo apt update --fix-missing && sudo apt install -f && sudo apt full-upgrade

If this does not solve the problem, please move to option # 2 below.

Option # 2:

To attempt to repair broken packages in the recovery mode, please follow these steps ( It is advised to connect your machine to Internet via Ethernet cable before you start ):

  1. Reboot your system.

  2. Hold the Shift key as soon as you pass the BIOS logo to enter the GRUB boot menu. You might need to repeat steps 1 and 2 a few times before you finally succeed.

  3. Once you see the options screen, select Advanced options for Ubuntu and press Enter:

    enter image description here

  4. In the next screen select the second line (the on with recovery mode) and press Enter:

    enter image description here

  5. Wait for the initial boot process to finish and a second screen with options appears. Select Enable networking and press Enter:

    enter image description here

  6. If presented with a yes/no screen, choose yes and press Enter:

    enter image description here

  7. If all goes well, you should be now connected to the Internet. You will know if it succeeds when the options screen shows up again. Now select Repair broken packages and press Enter:

    enter image description here

  8. If presented with a yes/no screen, choose yes and press Enter:

    enter image description here

  9. When you see at the command prompt Do you want to continue? type Y and press Enter:

    enter image description here

  10. If all goes well, the options screen will show up again:

    enter image description here

  11. Reboot your machine.

Raffa
  • 32,237
  • Option 1 just brings the same error message as previous and for some reason holding shift does not seem to bring up the grub menu as described so I was unable to even attempt this step. Ubuntu is installed on an NVME drive and shows as such in the BIOS. – Chris Gipson Aug 09 '19 at 17:19
  • @ChrisGipson This menu is part of GRUB. If Ubuntu boots up, which appears to be the case, this menu can be accessed. It is not a part of the BIOS. It is a part of Ubuntu. So wait until the BIOS finish doing its thing and then hold the left Shift key. it is only accessible for a second or two so timing is a bit crucial her. Sorry for the inconvenience, but this is how it's done. Another easy way to bring it up automatically is to not allow Ubuntu to boot completely, that is to hold Ctrl + Alt +Delete as soon as Ubuntu starts to boot and it will appear automatically. – Raffa Aug 09 '19 at 17:35
  • @ChrisGipson This will help https://wiki.ubuntu.com/RecoveryMode – Raffa Aug 09 '19 at 17:41
  • I had to edit grub setting to get it to come up but when I go to repair broken packages the screen goes blank as well. – Chris Gipson Aug 09 '19 at 17:48
  • I have exported my logs but have not figured out how to attach them here. I sure they would be of some use. – Chris Gipson Aug 09 '19 at 18:08
  • @ChrisGipson You can edit your question and paste them there or if the amount of text is large you can paste them here and link in your question https://paste.ubuntu.com/. Does your computer has NVIDIA graphics card? – Raffa Aug 09 '19 at 18:20
  • Yes its a GTX 1060 6GB I tried removing the nvidia driver but get the same blank screen problem when I try that. – Chris Gipson Aug 09 '19 at 18:39
  • @ChrisGipson Please follow the instructions in this link to try and purge NVIDIA drivers first and install the open source drivers then reboot and attempt the solution on this page again https://askubuntu.com/questions/1163516/problems-with-booting-the-system/1163539#1163539 The one with the green tick mark. – Raffa Aug 09 '19 at 18:44
  • That did not help either I ended up getting the original error message again. But I did a refresh install of ubuntu without the Nvidia drivers and everything almost went ok until the very end the installer crashed. I did boot after I restarted the machine with a few applications missing but not a huge deal. The system now updates as it should and running kernel 5.0.0 -23 instead of -21. – Chris Gipson Aug 09 '19 at 19:45