Can't Update Ubuntu 16.04

My software center has been jammed for about 2 weeks. When i click install on updates the progress bar goes immediately halfway...and then waits for the end of the universe.

How can I troubleshoot this? I've never used Ubuntu, just assume that I'm clinically Amish.

Edit: Here's the results of running apt-get update and apt-get upgrade after following Azendale's answer:

sudo apt-get update
[sudo] password for:
Hit:1 htp:// xenial InRelease
Get:2 htp:// xenial-updates InRelease [95.7 kB]
Hit:3 htp:// xenial-backports InRelease
Get:4 htp:// xenial-security InRelease [94.5 kB]
Get:5 htp:// xenial-updates/universe amd64 Packages [332 kB]
Get:6 htp:// xenial-updates/universe i386 Packages [328 kB]
Fetched 850 kB in 3s (275 kB/s)
Reading package lists... Done
:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED: linux-image-4.4.0-24-generic linux-image-4.4.0-28-generic linux-image-extra-4.4.0-24-generic linux-image-extra-4.4.0-28-generic
The following packages have been kept back: linux-generic linux-headers-generic linux-image-generic linux-signed-generic linux-signed-image-generic
The following packages will be upgraded: accountsservice apparmor bamfdaemon bind9-host chromium-codecs-ffmpeg-extra compiz compiz-core compiz-gnome compiz-plugins-default compizconfig-settings-manager cups-browsed cups-filters cups-filters-core-drivers dkms dnsutils eog file-roller firefox firefox-locale-en flashplugin-installer fontconfig fontconfig-config fwupd gir1.2-gdkpixbuf-2.0 gir1.2-javascriptcoregtk-4.0 gir1.2-webkit2-4.0 gnome-calendar gnome-font-viewer gnome-session-bin gnome-session-common gnome-settings-daemon-schemas gnome-sudoku gnome-system-monitor gnupg gpgv gtk2-engines-murrine ifupdown isc-dhcp-client isc-dhcp-common kpartx kpartx-boot libaccountsservice0 libapparmor-perl libapparmor1 libappstream-glib8 libbamf3-2 libbind9-140 libcompizconfig0 libcupsfilters1 libdecoration0 libdfu1 libdns-export162 libdns162 libdrm-amdgpu1 libdrm-amdgpu1:i386 libdrm-dev libdrm-intel1 libdrm-intel1:i386 libdrm-nouveau2 libdrm-nouveau2:i386 libdrm-radeon1 libdrm-radeon1:i386 libdrm2 libdrm2:i386 libegl1-mesa libegl1-mesa-dev libfontconfig1 libfontconfig1:i386 libfontembed1 libframe6 libfwupd1 libgbm1 libgcrypt20 libgcrypt20:i386 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgl1-mesa-dev libgl1-mesa-dri libgl1-mesa-dri:i386 libgl1-mesa-glx libgl1-mesa-glx:i386 libglapi-mesa libglapi-mesa:i386 libgles1-mesa libgles2-mesa libgles2-mesa-dev libgweather-3-6 libgweather-common libharfbuzz-icu0 libharfbuzz0b libidn11 libidn11:i386 libisc-export160 libisc160 libisccc140 libisccfg140 libjavascriptcoregtk-4.0-18 liblwres141 libmetacity-private3a libmysqlclient20:i386 libnm-glib-vpn1 libnm-glib4 libnm-gtk-common libnm-gtk0 libnm-util2 libnm0 libnma-common libnma0 libosmesa6 libosmesa6:i386 liboxideqt-qmlplugin liboxideqtcore0 liboxideqtquick0 libp11-kit0 libp11-kit0:i386 libpam-systemd libpoppler-glib8 libpoppler58 libpython3.5 libpython3.5-minimal libpython3.5-stdlib libsmbclient libssl1.0.0 libssl1.0.0:i386 libsystemd0 libsystemd0:i386 libudev-dev libudev1 libudev1:i386 libunity-core-6.0-9 libwayland-egl1-mesa libwbclient0 libwebkit2gtk-4.0-37 libwebkit2gtk-4.0-37-gtk2 libxatracker2 light-themes linux-libc-dev mesa-common-dev mesa-vdpau-drivers metacity metacity-common mtools mysql-common network-manager network-manager-gnome openssh-client openssl oxideqt-codecs-extra p11-kit p11-kit-modules p11-kit-modules:i386 poppler-utils python-compizconfig python3-distupgrade python3-software-properties python3.5 python3.5-minimal samba-libs snap-confine snapd software-properties-common software-properties-gtk sudo suru-icon-theme systemd systemd-sysv thunderbird thunderbird-gnome-support thunderbird-locale-en thunderbird-locale-en-us ubuntu-artwork ubuntu-core-launcher ubuntu-drivers-common ubuntu-mobile-icons ubuntu-mono ubuntu-release-upgrader-core ubuntu-release-upgrader-gtk ubuntu-session udev unity unity-schemas unity-services vino xdiagnose xserver-xorg-video-intel
185 upgraded, 0 newly installed, 4 to remove and 5 not upgraded.
13 not fully installed or removed.
Need to get 0 B/208 MB of archives.
After this operation, 410 MB disk space will be freed.
Do you want to continue? [Y/n] y
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 234231 files and directories currently installed.)
Removing linux-image-extra-4.4.0-24-generic (4.4.0-24.43) ...
depmod: FATAL: could not load /boot/System.map-4.4.0-24-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-24-generic /boot/vmlinuz-4.4.0-24-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.4.0-24-generic /boot/vmlinuz-4.4.0-24-generic
Error! Your kernel headers for kernel 4.4.0-24-generic cannot be found.
Please install the linux-headers-4.4.0-24-generic package,
or use the --kernelsourcedir option to tell DKMS where it's located
Error! Your kernel headers for kernel 4.4.0-24-generic cannot be found.
Please install the linux-headers-4.4.0-24-generic package,
or use the --kernelsourcedir option to tell DKMS where it's located
Error! Your kernel headers for kernel 4.4.0-24-generic cannot be found.
Please install the linux-headers-4.4.0-24-generic package,
or use the --kernelsourcedir option to tell DKMS where it's located
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-24-generic /boot/vmlinuz-4.4.0-24-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-24-generic
WARNING: missing /lib/modules/4.4.0-24-generic
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/4.4.0-24-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_lU1drr/lib/modules/4.4.0-24-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_lU1drr/lib/modules/4.4.0-24-generic/modules.builtin: No such file or directory
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-24-generic /boot/vmlinuz-4.4.0-24-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-24-generic /boot/vmlinuz-4.4.0-24-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-24-generic /boot/vmlinuz-4.4.0-24-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-24-generic /boot/vmlinuz-4.4.0-24-generic
/usr/sbin/grub-mkconfig: 11: /etc/default/grub: quiet splash acpi_backlight=vendor acpi_osi='!Windows 2013' acpi_osi='!Windows 2012': not found
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-extra-4.4.0-24-generic (--remove): subprocess installed post-removal script returned error exit status 1
Removing linux-image-4.4.0-24-generic (4.4.0-24.43) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-24-generic /boot/vmlinuz-4.4.0-24-generic
update-initramfs: Deleting /boot/initrd.img-4.4.0-24-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-24-generic /boot/vmlinuz-4.4.0-24-generic
/usr/sbin/grub-mkconfig: 11: /etc/default/grub: quiet splash acpi_backlight=vendor acpi_osi='!Windows 2013' acpi_osi='!Windows 2012': not found
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-4.4.0-24-generic.postrm line 328.
dpkg: error processing package linux-image-4.4.0-24-generic (--remove): subprocess installed post-removal script returned error exit status 1
Removing linux-image-extra-4.4.0-28-generic (4.4.0-28.47) ...
depmod: FATAL: could not load /boot/System.map-4.4.0-28-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-28-generic /boot/vmlinuz-4.4.0-28-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.4.0-28-generic /boot/vmlinuz-4.4.0-28-generic
Error! Your kernel headers for kernel 4.4.0-28-generic cannot be found.
Please install the linux-headers-4.4.0-28-generic package,
or use the --kernelsourcedir option to tell DKMS where it's located
Error! Your kernel headers for kernel 4.4.0-28-generic cannot be found.
Please install the linux-headers-4.4.0-28-generic package,
or use the --kernelsourcedir option to tell DKMS where it's located
Error! Your kernel headers for kernel 4.4.0-28-generic cannot be found.
Please install the linux-headers-4.4.0-28-generic package,
or use the --kernelsourcedir option to tell DKMS where it's located
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-28-generic /boot/vmlinuz-4.4.0-28-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-28-generic
WARNING: missing /lib/modules/4.4.0-28-generic
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/4.4.0-28-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_sMUWeu/lib/modules/4.4.0-28-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_sMUWeu/lib/modules/4.4.0-28-generic/modules.builtin: No such file or directory
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-28-generic /boot/vmlinuz-4.4.0-28-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-28-generic /boot/vmlinuz-4.4.0-28-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-28-generic /boot/vmlinuz-4.4.0-28-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-28-generic /boot/vmlinuz-4.4.0-28-generic
/usr/sbin/grub-mkconfig: 11: /etc/default/grub: quiet splash acpi_backlight=vendor acpi_osi='!Windows 2013' acpi_osi='!Windows 2012': not found
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-extra-4.4.0-28-generic (--remove): subprocess installed post-removal script returned error exit status 1
Removing linux-image-4.4.0-28-generic (4.4.0-28.47) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-28-generic /boot/vmlinuz-4.4.0-28-generic
update-initramfs: Deleting /boot/initrd.img-4.4.0-28-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-28-generic /boot/vmlinuz-4.4.0-28-generic
/usr/sbin/grub-mkconfig: 11: /etc/default/grub: quiet splash acpi_backlight=vendor acpi_osi='!Windows 2013' acpi_osi='!Windows 2012': not found
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-4.4.0-28-generic.postrm line 328.
dpkg: error processing package linux-image-4.4.0-28-generic (--remove): subprocess installed post-removal script returned error exit status 1
No apport report written because MaxReports is reached already Errors were encountered while processing: linux-image-extra-4.4.0-24-generic linux-image-4.4.0-24-generic linux-image-extra-4.4.0-28-generic linux-image-4.4.0-28-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
1

3 Answers

Try opening your terminal and running sudo apt update && sudo apt upgrade. It will prompt you for your user password. You should now be able to see any errors that are occurring. You can use those to ask a more specific question regarding those errors.

4

You might be seeing this bug (I ran into this myself after a new install):

You can use the top command on a terminal to see if this is your problem. "appstreamcli" will show up using 100% cpu.

Quick fix is to remove the /usr/bin/appstreamcli file and then update to the newest version:

sudo rm /usr/bin/appstreamcli
sudo apt-get update
sudo apt-get install appstream
4

First, start by opening the dash:

Ubuntu Dash Button

Search for Ubuntu Software Center:

Dash search for Ubuntu Software CenterSoftware Center start screen

Move your mouse cursor to the top of the screen, select "Edit" and then select "Software Sources".

Software Sources menu item

Go to the "Other Software" tab. Try unchecking each box to the left of each entry. (Don't worry, you can repeat this process and turn a few on at a time once you have updates working to figure out which one(s) are causing your problems and should stay off. So what we are doing here doesn't have to be permanent.)Other Software tab

Click close. You will likely be prompted to update the package list and/or enter your password.

Authentication Dialog

After that, you should see (if you click on the

Progress/Tasks tab

tab/icon) they package list updating:

Progress/Tasks page

If that does finish successfully, then you should now be able to install updates normally now!

Edit: You said you are still getting errors about signature problems. Open up the dash, search for terminal, and open it.

Put this in:

sudo apt-get update
sudo apt-get upgrade

Then copy the output, edit your original question, and add the output from the terminal on the end. We'll work through it from there. A reinstall shouldn't be necessary.

Edit: Ok, it looks like there is something a little weird going on with the kernel packages. You could take the output from the terminal and make it a new question, with a title of something like "Apt update trouble with linux-headers-4.4.0-24-generic", which would make it more likely someone more knowledgeable than I will see an answer your question. But I will also try to guess what we should try next.

Can you try running this in a terminal (and again editing your question to add the output to the end):

sudo apt-get install linux-headers-4.4.0-24-generic
sudo apt-get install -f

I'm not sure what order you'll have to do those in, but it doesn't hurt to do them more than once, so you can try the commands in both orders if need be.

4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like