(Solved) Failed Kernel 5.11.0-37 install preventing updates

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
hag6
Level 2
Level 2
Posts: 90
Joined: Mon Nov 04, 2019 9:32 am

(Solved) Failed Kernel 5.11.0-37 install preventing updates

Post by hag6 »

Hi when I attempt to install update I get the following error message:

Code: Select all

E: linux-image-5.11.0-37-generic: installed linux-image-5.11.0-37-generic package post-removal script subprocess returned error exit status 1
My attempts remove the kernel have failed:

Code: Select all

sudo apt-get purge linux-image-5.11.0-37-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  linux-hwe-5.11-headers-5.11.0-37
Use 'sudo apt autoremove' to remove it.
E: Could not get lock /var/cache/apt/archives/lock. It is held by process 15690 (synaptic)
N: Be aware that removing the lock file is not a solution and may break your system.
E: Unable to lock directory /var/cache/apt/archives/
$ sudo apt autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Could not get lock /var/cache/apt/archives/lock. It is held by process 15690 (synaptic)
N: Be aware that removing the lock file is not a solution and may break your system.
E: Unable to lock directory /var/cache/apt/archives/

Code: Select all

$ inxi -Fxpmrz
System:    Kernel: 5.4.0-88-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Cinnamon 5.0.6 Distro: Linux Mint 20.2 Uma 
           base: Ubuntu 20.04 focal 
Machine:   Type: Desktop Mobo: Gigabyte model: GA-MA790FXT-UD5P v: x.x serial: <filter> BIOS: Award v: F8n date: 01/07/2011 
Memory:    RAM: total: 15.64 GiB used: 2.14 GiB (13.7%) 
           RAM Report: permissions: Unable to run dmidecode. Root privileges required. 
CPU:       Topology: Quad Core model: AMD Phenom II X4 955 bits: 64 type: MCP arch: K10 rev: 2 L2 cache: 2048 KiB 
           flags: lm nx pae sse sse2 sse3 sse4a svm bogomips: 25717 
           Speed: 800 MHz min/max: 800/3200 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 4: 800 
Graphics:  Device-1: NVIDIA GP107 [GeForce GTX 1050 Ti] vendor: eVga.com. driver: nvidia v: 470.74 bus ID: 01:00.0 
           Display: x11 server: X.Org 1.20.11 driver: nvidia unloaded: fbdev,modesetting,nouveau,vesa 
           resolution: 1680x1050~60Hz 
           OpenGL: renderer: NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2 v: 4.6.0 NVIDIA 470.74 direct render: Yes 
Audio:     Device-1: Advanced Micro Devices [AMD/ATI] SBx00 Azalia vendor: Gigabyte driver: snd_hda_intel v: kernel 
           bus ID: 00:14.2 
           Device-2: NVIDIA GP107GL High Definition Audio vendor: eVga.com. driver: snd_hda_intel v: kernel bus ID: 01:00.1 
           Device-3: XMOS iFi (by AMR) HD USB Audio type: USB driver: hid-generic,snd-usb-audio,usbhid bus ID: 8-3:2 
           Sound Server: ALSA v: k5.4.0-88-generic 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Gigabyte driver: r8168 v: 8.049.02-NAPI 
           port: de00 bus ID: 03:00.0 
           IF: enp3s0 state: down mac: <filter> 
           Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Gigabyte driver: r8168 v: 8.049.02-NAPI 
           port: ce00 bus ID: 04:00.0 
           IF: enp4s0 state: up speed: 100 Mbps duplex: full mac: <filter> 
Drives:    Local Storage: total: 11.03 TiB used: 1.82 TiB (16.5%) 
           ID-1: /dev/sda vendor: Crucial model: CT1000MX500SSD1 size: 931.51 GiB temp: 31 C 
           ID-2: /dev/sdb vendor: Crucial model: M4-CT128M4SSD2 size: 119.24 GiB 
           ID-3: /dev/sdc vendor: HGST (Hitachi) model: HDS724040ALE640 size: 3.64 TiB temp: 37 C 
           ID-4: /dev/sdd vendor: Seagate model: ST32000542AS size: 1.82 TiB 
           ID-5: /dev/sde vendor: Toshiba model: HDWE150 size: 4.55 TiB temp: 43 C 
Partition: ID-1: / size: 915.89 GiB used: 15.33 GiB (1.7%) fs: ext4 dev: /dev/sda1 
           ID-2: /media/h/New Volume size: 1.82 TiB used: 1.80 TiB (99.2%) fs: ntfs dev: /dev/sdd1 
Sensors:   System Temperatures: cpu: 37.4 C mobo: N/A gpu: nvidia temp: 30 C 
           Fan Speeds (RPM): N/A gpu: nvidia fan: 30% 
Repos:     No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/graphics-drivers-ppa-focal.list 
           1: deb http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu focal main
           Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
           1: deb http://packages.linuxmint.com uma main upstream import backport #id:linuxmint_main
           2: deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse
           3: deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
           4: deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
           5: deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
           6: deb http://archive.canonical.com/ubuntu/ focal partner
           Active apt repos in: /etc/apt/sources.list.d/opera-stable.list 
           1: deb https://deb.opera.com/opera-stable/ stable non-free #Opera Browser (final releases)
           Active apt repos in: /etc/apt/sources.list.d/ubuntuhandbook1-apps-focal.list 
           1: deb http://ppa.launchpad.net/ubuntuhandbook1/apps/ubuntu focal main
           Active apt repos in: /etc/apt/sources.list.d/vivaldi.list 
           1: deb http://repo.vivaldi.com/stable/deb/ stable main
Info:      Processes: 240 Uptime: 2h 22m Init: systemd runlevel: 5 Compilers: gcc: 9.3.0 Shell: bash v: 5.0.17 inxi: 3.0.38 
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
sleeper12
Level 21
Level 21
Posts: 14591
Joined: Thu May 25, 2017 3:22 pm

Re: Failed Kernel 5.11.0-37 install preventing updates

Post by sleeper12 »

Looks like you might have Synaptic open. If so, close it.
hag6
Level 2
Level 2
Posts: 90
Joined: Mon Nov 04, 2019 9:32 am

Re: Failed Kernel 5.11.0-37 install preventing updates

Post by hag6 »

Thanks for your response. The following details were generated when clicking on the initial error message:

Code: Select all

(Reading database ... 343695 files and directories currently installed.)
Removing linux-image-5.11.0-37-generic (5.11.0-37.41~20.04.2) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.11.0-37-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 1: /etc/default/grub: you: not found
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-5.11.0-37-generic (--remove):
 installed linux-image-5.11.0-37-generic package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-5.11.0-37-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
sleeper12
Level 21
Level 21
Posts: 14591
Joined: Thu May 25, 2017 3:22 pm

Re: Failed Kernel 5.11.0-37 install preventing updates

Post by sleeper12 »

I was responding to this error:

E: Could not get lock /var/cache/apt/archives/lock. It is held by process 15690 (synaptic)

Do you still get that?
hag6
Level 2
Level 2
Posts: 90
Joined: Mon Nov 04, 2019 9:32 am

Re: Failed Kernel 5.11.0-37 install preventing updates

Post by hag6 »

I tried to "kill" synaptic but when I returned to Update Manager the Synaptic sign-in box requires password authentication.
sleeper12
Level 21
Level 21
Posts: 14591
Joined: Thu May 25, 2017 3:22 pm

Re: Failed Kernel 5.11.0-37 install preventing updates

Post by sleeper12 »

See if this kills it:

Code: Select all

 sudo killall apt-get 
hag6
Level 2
Level 2
Posts: 90
Joined: Mon Nov 04, 2019 9:32 am

Re: Failed Kernel 5.11.0-37 install preventing updates

Post by hag6 »

"No process found"
sleeper12
Level 21
Level 21
Posts: 14591
Joined: Thu May 25, 2017 3:22 pm

Re: Failed Kernel 5.11.0-37 install preventing updates

Post by sleeper12 »

Ok, maybe that error is gone then :?: Anyway, someone else will need to help with the kernel issue.
hag6
Level 2
Level 2
Posts: 90
Joined: Mon Nov 04, 2019 9:32 am

Re: Failed Kernel 5.11.0-37 install preventing updates

Post by hag6 »

Thanks for taking the time to offer your help. I think the kernel is the main issue.
sleeper12
Level 21
Level 21
Posts: 14591
Joined: Thu May 25, 2017 3:22 pm

Re: Failed Kernel 5.11.0-37 install preventing updates

Post by sleeper12 »

Oh, definitely. There's another thread with a similar problem here:
viewtopic.php?f=90&t=359597

Different kernel, but you might want to keep an eye out if a solution is found there.
Last edited by sleeper12 on Wed Oct 20, 2021 2:25 pm, edited 1 time in total.
hag6
Level 2
Level 2
Posts: 90
Joined: Mon Nov 04, 2019 9:32 am

Re: Failed Kernel 5.11.0-37 install preventing updates

Post by hag6 »

Interesting Thanks
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Failed Kernel 5.11.0-37 install preventing updates

Post by rene »

hag6 wrote: Wed Oct 20, 2021 1:07 pm

Code: Select all

/usr/sbin/grub-mkconfig: 1: /etc/default/grub: you: not found
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
You appear to have typoed /etc/default/grub. If you don't immediately see what and where please show us that file --- but I expect you will. "you"?
hag6
Level 2
Level 2
Posts: 90
Joined: Mon Nov 04, 2019 9:32 am

Re: Failed Kernel 5.11.0-37 install preventing updates

Post by hag6 »

Thanks for responding to my issue. I didn't type this.

Code: Select all

/usr/sbin/grub-mkconfig: 1: /etc/default/grub: you: not found
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
It was generated when I attempted to update.
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Failed Kernel 5.11.0-37 install preventing updates

Post by rene »

I know. I said/meant that the file /etc/default/grub is apparently typoed/damaged.
hag6
Level 2
Level 2
Posts: 90
Joined: Mon Nov 04, 2019 9:32 am

Re: Failed Kernel 5.11.0-37 install preventing updates

Post by hag6 »

Is there a model grub file I can check against. Each time I attempt to update I get the same error:

Code: Select all

(Reading database ... 343695 files and directories currently installed.)
Removing linux-image-5.11.0-37-generic (5.11.0-37.41~20.04.2) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.11.0-37-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
/usr/sbin/grub-mkconfig: 1: /etc/default/grub: you: not found
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-5.11.0-37-generic (--remove):
 installed linux-image-5.11.0-37-generic package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-5.11.0-37-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
hag6
Level 2
Level 2
Posts: 90
Joined: Mon Nov 04, 2019 9:32 am

Re: Failed Kernel 5.11.0-37 install preventing updates

Post by hag6 »

I think I've solved it with your prompt. I opened grub

Code: Select all

/etc/default/grub
and the first line # was missing. I replaced it, saved the file ran

Code: Select all

sudo update grub
then attempted the update, which included kernel 5.11.0-37, and it executed.

Thank you so much
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: Failed Kernel 5.11.0-37 install preventing updates

Post by rene »

Yap, that would be all good now then (assuming you in fact ran sudo update-grub with that hyphen). Cheers.
sleeper12
Level 21
Level 21
Posts: 14591
Joined: Thu May 25, 2017 3:22 pm

Re: Failed Kernel 5.11.0-37 install preventing updates

Post by sleeper12 »

rene,

Thanks for jumping in here. :wink:
hag6
Level 2
Level 2
Posts: 90
Joined: Mon Nov 04, 2019 9:32 am

Re: Failed Kernel 5.11.0-37 install preventing updates

Post by hag6 »

Thanks sleeper12 & reneI really precasted your help with this issue.
Locked

Return to “Software & Applications”