2

after installing debian i right away changed the repositories to testing:

$ cat /etc/apt/sources.list
# Debian packages for testing
deb http://ftp.by.debian.org/debian/ testing main non-free contrib
# Uncomment the deb-src line if you want 'apt-get source'
# to work with most packages.
deb-src http://ftp.by.debian.org/debian/ testing main non-free contrib

# Security updates for stable
# deb http://security.debian.org/ stable/updates main contrib

i would like to install linux headers as they are required to install nvidia drivers.

apparently when i switched to testing my kernel stayed the same version as there was no linux-headers installed (i assume). it was 4.9.0-3-amd64 but now it is 4.11.0-1-amd64. i installed 4.11.0-1-amd64 after checking out what is available:

~$ apt-cache search linux-image
linux-headers-4.11.0-1-amd64 - Header files for Linux 4.11.0-1-amd64
linux-headers-4.11.0-1-rt-amd64 - Header files for Linux 4.11.0-1-rt-amd64
linux-image-4.11.0-1-amd64 - Linux 4.11 for 64-bit PCs
linux-image-4.11.0-1-amd64-dbg - Debug symbols for linux-image-4.11.0-1-amd64
linux-image-4.11.0-1-rt-amd64 - Linux 4.11 for 64-bit PCs, PREEMPT_RT
linux-image-4.11.0-1-rt-amd64-dbg - Debug symbols for linux-image-4.11.0-1-rt-amd64
linux-image-4.9.0-3-amd64 - Linux 4.9 for 64-bit PCs
linux-image-4.9.0-3-rt-amd64 - Linux 4.9 for 64-bit PCs, PREEMPT_RT
linux-image-amd64 - Linux for 64-bit PCs (meta-package)
linux-image-rt-amd64 - Linux for 64-bit PCs (meta-package), PREEMPT_RT

now i would like to install the headers by running:

~$ sudo apt-get install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,')
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 linux-headers-amd64 : Depends: linux-headers-4.9.0-3-amd64 but it is not installable
E: Unable to correct problems, you have held broken packages.

it complains that i have unmet dependencies. how can i install the meta header pack?

PS: when i check linux-headers-amd64 it says it depends on linux-headers-4.9.0-3-amd64. but when i had the older kernel (linux-image-4.9.0-3-amd64) it was also complaining about the same unmet dependencies!

3

2 Answers 2

0

I had the same problem, I was running 4.9.0-3 and a recent update broke my X server (I got dropped to text console).

I found out that the nVidia module was not loaded, so I tried to recompile it. That's when I noticed that the kernel headers were missing.

My solution was to install linux-image-4.11.0-1-all together with the appropriate headers. After a reboot into the new kernel I recompiled the nVidia kernel module. Currently I have the following packages installed:

linux-headers-4.11.0-1-all
linux-headers-4.11.0-1-all-amd64
linux-headers-4.11.0-1-amd64
linux-headers-4.11.0-1-common
linux-headers-4.11.0-1-common-rt
linux-headers-4.11.0-1-rt-amd64

That's what fixed the issue. I see a bug in the package repository here, since installing linux-headers-amd64 does not offer any conflict resolution except not installing it. I am myself waiting for an update that fixes the issue, especially since the ZFS kernel module won't install as well.

0

Apparently the packages needed to be upgraded by the Debian package maintainers themselves. Right now, https://packages.debian.org/buster/linux-headers-amd64 has the correct dependencies.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .