Fails to install linux-headers-6.5.0-28-generic

Bug #2064961 reported by Ed Johns
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
New
Undecided
Unassigned

Bug Description

When attempting to install linux-headers-6.5.0-28-generic, I get the following errors:

dpkg: error processing archive /var/cache/apt/archives/linux-headers-6.5.0-28-generic_6.5.0-28.29_amd64.deb (--unpack):
 error creating symbolic link './lib/modules/6.5.0-28-generic/build': Read-only file system
dpkg: error while cleaning up:
 unable to remove newly-extracted version of '/lib/modules/6.5.0-28-generic/build': Read-only file system
Errors were encountered while processing:
 /var/cache/apt/archives/linux-headers-6.5.0-28-generic_6.5.0-28.29_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

When I went looking for the build directory referenced in the message, I found the following misspelling in the symlink. I am not sure if this is what is causing the problem or a happy accident, because the target directory /usr/src/linux-headers-6.5.0-28 exists, but /usr/src/linux-headers-6.5.0-28-generic doesn't:

❯ ls -al /usr/lib/modules/6.5.0-28-generic/build
lrwxrwxrwx 1 root root 38 Apr 8 04:03 /usr/lib/modules/6.5.0-28-generic/build -> /usr/src/linux-heders-6.5.0-28-generic

System config:

❯ cat /proc/version_signature
Ubuntu 6.5.0-28.29-generic 6.5.13
❯ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 23.10
Release: 23.10
Codename: mantic
❯ uname -a
Linux test-ws0 6.5.0-28-generic #29-Ubuntu SMP PREEMPT_DYNAMIC Thu Mar 28 23:46:48 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

ProblemType: Bug
DistroRelease: Ubuntu 23.10
Package: linux-headers-6.5.0-28-generic (not installed)
ProcVersionSignature: Ubuntu 6.5.0-28.29-generic 6.5.13
Uname: Linux 6.5.0-28-generic x86_64
ApportVersion: 2.27.0-0ubuntu5
Architecture: amd64
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/controlC0', '/dev/snd/hwC0D2', '/dev/snd/pcmC0D9p', '/dev/snd/pcmC0D8p', '/dev/snd/pcmC0D7p', '/dev/snd/pcmC0D3p', '/dev/snd/by-path', '/dev/snd/by-id', '/dev/snd/controlC1', '/dev/snd/pcmC1D0c', '/dev/snd/pcmC1D0p', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Mon May 6 16:36:43 2024
InstallationDate: Installed on 2024-02-04 (93 days ago)
InstallationMedia: Ubuntu 23.10.1 "Mantic Minotaur" - Release amd64 (20231016.1)
Lsusb:
 Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
 Bus 001 Device 004: ID 0bda:b85b Realtek Semiconductor Corp. Bluetooth Radio
 Bus 001 Device 003: ID 0573:1573 Zoran Co. Personal Media Division (Nogatech) USB Audio and HID
 Bus 001 Device 002: ID 0b05:190e ASUSTek Computer, Inc. ASUS USB-BT500
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: {report['dmi.sys.vendor']} {report['dmi.product.name']}
ProcEnviron:
 LANG=en_US.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=xterm-256color
 XDG_RUNTIME_DIR=<set>
ProcFB: 0 i915drmfb
ProcKernelCmdLine: snapd_recovery_mode=run console=ttyS0,115200n8 console=tty1 panic=-1 quiet splash
RelatedPackageVersions:
 linux-restricted-modules-6.5.0-28-generic N/A
 linux-backports-modules-6.5.0-28-generic N/A
 linux-firmware N/A
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 10/21/2023
dmi.bios.release: 5.27
dmi.bios.vendor: American Megatrends International, LLC.
dmi.bios.version: GMK_G3
dmi.board.asset.tag: Default string
dmi.board.name: GMKtec
dmi.board.vendor: GMKtec
dmi.board.version: Default string
dmi.chassis.asset.tag: Default string
dmi.chassis.type: 0
dmi.chassis.vendor: Default string
dmi.chassis.version: Default string
dmi.modalias: dmi:bvnAmericanMegatrendsInternational,LLC.:bvrGMK_G3:bd10/21/2023:br5.27:svnGMKtec:pnNucBoxG3:pvrDefaultstring:rvnGMKtec:rnGMKtec:rvrDefaultstring:cvnDefaultstring:ct0:cvrDefaultstring:skuG3-001:
dmi.product.family: MINI
dmi.product.name: NucBox G3
dmi.product.sku: G3-001
dmi.product.version: Default string
dmi.sys.vendor: GMKtec

Revision history for this message
Ed Johns (ejohns) wrote :
Revision history for this message
Juerg Haefliger (juergh) wrote :

Do you have anti-virus software installed? That misnamed link looks indeed funny but I have the smae packages installed here and all looks fine so don't believe it's a package problem. How did you install the header packages? Can you remove all header packages and try again?

$ apt purge linux-headers-6.5.0-28 linux-headers-6.5.0-28-generic linux-headers-generic
$ apt install linux-headers-generic

Revision history for this message
Ed Johns (ejohns) wrote :

No antivirus. Installed using "apt install linux-headers-generic". Here's what happened when I tried to purge and reinstall:

❯ apt purge linux-headers-6.5.0-28 linux-headers-6.5.0-28-generic linux-headers-generic
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  linux-headers-6.5.0-28* linux-headers-6.5.0-28-generic* linux-headers-generic*
0 upgraded, 0 newly installed, 3 to remove and 3 not upgraded.
2 not fully installed or removed.
After this operation, 84.1 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 297231 files and directories currently installed.)
Removing linux-headers-generic (6.5.0.28.28) ...
dpkg: error processing package linux-headers-6.5.0-28-generic (--remove):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting a removal
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-headers-6.5.0-28-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

❯ apt install linux-headers-generic
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  linux-headers-6.5.0-28-generic
The following NEW packages will be installed:
  linux-headers-generic
The following packages will be upgraded:
  linux-headers-6.5.0-28-generic
1 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
1 not fully installed or removed.
Need to get 9,124 B/3,831 kB of archives.
After this operation, 29.0 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://archive.ubuntu.com/ubuntu mantic-updates/main amd64 linux-headers-generic amd64 6.5.0.28.28 [9,124 B]
Fetched 9,124 B in 0s (113 kB/s)
(Reading database ... 297228 files and directories currently installed.)
Preparing to unpack .../linux-headers-6.5.0-28-generic_6.5.0-28.29_amd64.deb ...
Unpacking linux-headers-6.5.0-28-generic (6.5.0-28.29) over (6.5.0-28.29) ...
dpkg: error processing archive /var/cache/apt/archives/linux-headers-6.5.0-28-generic_6.5.0-28.29_amd64.deb (--unpack):
 error creating symbolic link './lib/modules/6.5.0-28-generic/build': Read-only file system
dpkg: error while cleaning up:
 unable to remove newly-extracted version of '/lib/modules/6.5.0-28-generic/build': Read-only file system
Selecting previously unselected package linux-headers-generic.
Preparing to unpack .../linux-headers-generic_6.5.0.28.28_amd64.deb ...
Unpacking linux-headers-generic (6.5.0.28.28) ...
Errors were encountered while processing:
 /var/cache/apt/archives/linux-headers-6.5.0-28-generic_6.5.0-28.29_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.