linux-image-4.15.0-39-generic error

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
corktowner
Level 1
Level 1
Posts: 1
Joined: Tue Nov 13, 2018 4:00 pm

linux-image-4.15.0-39-generic error

Post by corktowner » Tue Nov 13, 2018 4:07 pm

Update is offering a security update to linux-image-4.15.0-39-generic, however attempting to install this update results in a "fix broken package" message.
kernel error msg.jpg
Spectacle.a30527.png
Spectacle.a30527.png (11.01 KiB) Viewed 485 times

JeremyB
Level 19
Level 19
Posts: 9445
Joined: Fri Feb 21, 2014 8:17 am

Re: linux-image-4.15.0-39-generic error

Post by JeremyB » Tue Nov 13, 2018 5:39 pm

Close the Update Manager and open Synaptic Package Manager, click edit, then fix broken, then if it works, close Synaptic and see if the kernel can be installed with Update Manager

User avatar
karlchen
Level 19
Level 19
Posts: 9512
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: linux-image-4.15.0-39-generic error

Post by karlchen » Tue Nov 13, 2018 5:47 pm

Hello, corktowner.

Here Update Manager had offered the new kernel package 4.15.0-39 as well.

Image

Note:
All 3 groups of kernel updates are required. In your screenshot I only spot the third entry from my list, linux-kernel-4.150-39.42.
Maybe you could refresh the list. - Button [Refresh]. - And try again.

In case this does not help, then you will really have broken dependencies in your system. You should do as JeremyB had advised.

Best regards,
Karl
--
P.S.:
Here the kernel update packages have been installed by Update Manager without any warnings or error messages. All fine.
From Synaptic History:

Code: Select all

Commit Log for Tue Nov 13 22:13:45 2018

Die folgenden Pakete wurden aktualisiert:
linux-generic (4.15.0.38.40) to 4.15.0.39.41
linux-headers-generic (4.15.0.38.40) to 4.15.0.39.41
linux-image-generic (4.15.0.38.40) to 4.15.0.39.41
linux-libc-dev (4.15.0-38.41) to 4.15.0-39.42

Die folgenden Pakete wurden installiert:
linux-headers-4.15.0-39 (4.15.0-39.42)
linux-headers-4.15.0-39-generic (4.15.0-39.42)
linux-image-4.15.0-39-generic (4.15.0-39.42)
linux-modules-4.15.0-39-generic (4.15.0-39.42)
linux-modules-extra-4.15.0-39-generic (4.15.0-39.42)
Image
Linux Mint 18.1 64-bit Cinnamon Desktop, Total Commander 9.21a 64-bit
Ubuntu 18.04.1 32-bit Mate Desktop, Total Commander 9.21a 32-bit
Windows? - 1 window in every room

DesertRose
Level 1
Level 1
Posts: 5
Joined: Wed Nov 14, 2018 4:38 pm

Re: linux-image-4.15.0-39-generic error

Post by DesertRose » Wed Nov 14, 2018 4:46 pm

I'm having a similar problem, trying to install this update. It tells me that I have a broken package, so I go into Synaptic Package Manager, filter for broken dependencies, click on Fix Broken Packages, and then when I try to Apply Changes, it gives me the same broken package error. I'm getting some nonsense about "failed to write (no space left on device)" except that I have 10.69 GB of disk space free.

It's really frustrating, and I've tried fixing broken packages and then rebooting and trying again, but the package appears to be fixed up to the point where I try to apply the changes, then it's broken again. I've tried fixing the broken package, applying changes, and then rebooting; I've tried fixing the broken package and rebooting without applying changes, and the package remains broken and won't install the kernel upgrade at all.

I'm running Mint 18.3.

JeremyB
Level 19
Level 19
Posts: 9445
Joined: Fri Feb 21, 2014 8:17 am

Re: linux-image-4.15.0-39-generic error

Post by JeremyB » Wed Nov 14, 2018 6:06 pm

If you have a /boot partition and don't have enough space for a new kernel, it will fail

User avatar
karlchen
Level 19
Level 19
Posts: 9512
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: linux-image-4.15.0-39-generic error

Post by karlchen » Wed Nov 14, 2018 6:54 pm

Hello, corktowner.

Have you made any kind of progress solving the reported issue?
In case you have not done so, it would be helpful to learn which dependencies precisely cannot be satisfied.
Please, open a terminal window.
Execute the commandline below exactly as it has been typed here. It will simulate the upgrade process without really changing anything.

Code: Select all

sudo apt-get --simulate upgrade
Mark the commandline and the complete screen output which it will display and paste it into your next reply.

Best regards,
Karl
Image
Linux Mint 18.1 64-bit Cinnamon Desktop, Total Commander 9.21a 64-bit
Ubuntu 18.04.1 32-bit Mate Desktop, Total Commander 9.21a 32-bit
Windows? - 1 window in every room

DesertRose
Level 1
Level 1
Posts: 5
Joined: Wed Nov 14, 2018 4:38 pm

Re: linux-image-4.15.0-39-generic error

Post by DesertRose » Thu Nov 15, 2018 12:34 pm

Okay, running the simulate command, I got this:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
linux-modules-extra-4.15.0-39-generic : Depends: linux-image-4.15.0-39-generic but it is not installed or
linux-image-unsigned-4.15.0-39-generic but it is not installed
E: Unmet dependencies. Try using -f.
So I ran "sudo apt-get -f install" and got the following:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
linux-image-4.15.0-39-generic linux-modules-4.15.0-39-generic
Suggested packages:
fdutils linux-hwe-tools
The following NEW packages will be installed:
linux-image-4.15.0-39-generic linux-modules-4.15.0-39-generic
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0 B/20.9 MB of archives.
After this operation, 74.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 450316 files and directories currently installed.)
Preparing to unpack .../linux-modules-4.15.0-39-generic_4.15.0-39.42~16.04.1_amd64.deb ...
Unpacking linux-modules-4.15.0-39-generic (4.15.0-39.42~16.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/linux-modules-4.15.0-39-generic_4.15.0-39.42~16.04.1_amd64.deb (--unpack):
cannot copy extracted data for './boot/System.map-4.15.0-39-generic' to '/boot/System.map-4.15.0-39-generic.dpkg-new': failed to write (No space left on device)
No apport report written because the error message indicates a disk full error
Preparing to unpack .../linux-image-4.15.0-39-generic_4.15.0-39.42~16.04.1_amd64.deb ...
Unpacking linux-image-4.15.0-39-generic (4.15.0-39.42~16.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-4.15.0-39-generic_4.15.0-39.42~16.04.1_amd64.deb (--unpack):
cannot copy extracted data for './boot/vmlinuz-4.15.0-39-generic' to '/boot/vmlinuz-4.15.0-39-generic.dpkg-new': failed to write (No space left on device)
No apport report written because the error message indicates a disk full error
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/linux-modules-4.15.0-39-generic_4.15.0-39.42~16.04.1_amd64.deb
/var/cache/apt/archives/linux-image-4.15.0-39-generic_4.15.0-39.42~16.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I used to dual-boot Windows 10 and Ubuntu on this computer, but an Ubuntu update caused it to crash entirely, so at that point (a year or more ago), I reformatted the hard drive and installed Mint. I still have a little over 8 GB free space on the hard drive, so I'm not sure why I'm getting this "no space left on device error."

twd78
Level 1
Level 1
Posts: 28
Joined: Thu Nov 15, 2018 12:13 pm

Re: linux-image-4.15.0-39-generic error

Post by twd78 » Thu Nov 15, 2018 12:55 pm

It has to be no space left, otherwise it would not complain:
Post the output of df

DesertRose
Level 1
Level 1
Posts: 5
Joined: Wed Nov 14, 2018 4:38 pm

Re: linux-image-4.15.0-39-generic error

Post by DesertRose » Thu Nov 15, 2018 1:25 pm

Should I just paste it in the message field? In preview, it's not displaying very legibly.

twd78
Level 1
Level 1
Posts: 28
Joined: Thu Nov 15, 2018 12:13 pm

Re: linux-image-4.15.0-39-generic error

Post by twd78 » Thu Nov 15, 2018 1:35 pm

Use the code tags seen above the text you type in here as </> and enter the text within the code code

DesertRose
Level 1
Level 1
Posts: 5
Joined: Wed Nov 14, 2018 4:38 pm

Re: linux-image-4.15.0-39-generic error

Post by DesertRose » Thu Nov 15, 2018 1:42 pm

Okay, thanks.

Output of DF:

Code: Select all

Filesystem                1K-blocks     Used Available Use% Mounted on
udev                        3977340        0   3977340   0% /dev
tmpfs                        801524     9424    792100   2% /run
/dev/mapper/mint--vg-root 952702892 13854420 890430888   2% /
tmpfs                       4007612   349820   3657792   9% /dev/shm
tmpfs                          5120        4      5116   1% /run/lock
tmpfs                       4007612        0   4007612   0% /sys/fs/cgroup
/dev/sda1                    482922   477557         0 100% /boot
cgmfs                           100        0       100   0% /run/cgmanager/fs
tmpfs                        801524        0    801524   0% /run/user/122
tmpfs                        801524       52    801472   1% /run/user/1000

gm10
Level 13
Level 13
Posts: 4599
Joined: Thu Jun 21, 2018 5:11 pm

Re: linux-image-4.15.0-39-generic error

Post by gm10 » Thu Nov 15, 2018 1:51 pm

Yep, full /boot partition.

Run this (copy & paste as a whole into a terminal window):

Code: Select all

dpkg-query -W -f '${Version}\n' 'linux-image-[^g]*'|sort -u|sed -e '/^$/d' -e 's/\~[^~]*$//' -e 's/\.[^.]*$//' -e "/$(uname -r|sed s/-generic//)/d" -e 's/.*/sudo rm -rfv \/boot\/*-&-*/'|source /dev/stdin
followed by this:

Code: Select all

sudo apt-get install -f -y
I don't need the output from those previous ones but if the next one generates errors please post:

Code: Select all

sudo apt-get autoremove --purge -y
Last but not least:

Code: Select all

sudo update-grub
And then try whatever you've got left to do in Update Manager again.

DesertRose
Level 1
Level 1
Posts: 5
Joined: Wed Nov 14, 2018 4:38 pm

Re: linux-image-4.15.0-39-generic error [Later problem solved]

Post by DesertRose » Thu Nov 15, 2018 2:05 pm

Holy cow! Thank you! After I ran the commands you listed and refreshed Update Manager, Update Manager said the system is up to date!

gm10
Level 13
Level 13
Posts: 4599
Joined: Thu Jun 21, 2018 5:11 pm

Re: linux-image-4.15.0-39-generic error

Post by gm10 » Thu Nov 15, 2018 2:11 pm

You are welcome. It happens a lot with users that use a separate /boot partition, that's why I ended up developing that little script - you cannot remove kernels the normal way anymore once that partition is full.

If you want you can use another script of mine to automatically remove old kernels on a weekly basis, that way you won't have to remove them manually and prevent this from happening again. Run this once to set it up, it will work automatically afterwards:

Code: Select all

F=/etc/cron.weekly/purge_old_kernels;echo '#!/bin/bash'|sudo tee $F;echo "dpkg-query -W -f '\${Version}\n' 'linux-image-[^g]*'|sort -u|sed -e '/^$/d' -e 's/\~[^~]*$//' -e 's/\.[^.]*$//' -e \"/\$(uname -r|sed 's/-generic\|-lowlatency//')/d\" -e 's/.*/linux-*-&*/'|tr '\n' ' '|xargs -r apt-get remove --purge -y"|sudo tee -a $F;sudo chmod +x $F

Post Reply

Return to “Software & Applications”