Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

After a fresh ubuntu 12.10 installation, I faced some problems installing Nvidia drivers.

After some research discovered that linux-headers are not being upgraded when executing sudo apt-get dist-upgrade. I had to install the new headers manually although linux-image packages are installed.

Anyone knows why is this happening to me? Is it normal or there's something wrong?

share|improve this question

2 Answers 2

up vote 7 down vote accepted

If you installed linux-headers matching your running kernel version only, for example, linux-headers-3.5.0-18, then they will not be upgraded. Instead, do:

sudo apt-get install linux-headers-generic

The -generic header package will update headers every time linux-image is updated.

share|improve this answer

I recently ran into a similar problem during Nvidia drivers installation. I am not a Linux expert so I didn't really know where to start looking, but one thing caught my attention. When I run uname -r, I get

3.2.0-30-generic-pae

Then, dpkg -l | grep linux-headers:

ii  linux-headers-3.5.0-18                                      3.5.0-18.29                               all          Header files related to Linux kernel version 3.5.0
ii  linux-headers-3.5.0-18-generic                              3.5.0-18.29                               i386         Linux kernel headers for version 3.5.0 on 32 bit x86 SMP
ii  linux-headers-3.5.0-19                                      3.5.0-19.30                               all          Header files related to Linux kernel version 3.5.0
ii  linux-headers-3.5.0-19-generic                              3.5.0-19.30                               i386         Linux kernel headers for version 3.5.0 on 32 bit x86 SMP
ii  linux-headers-3.5.0-21                                      3.5.0-21.32                               all          Header files related to Linux kernel version 3.5.0
ii  linux-headers-3.5.0-21-generic                              3.5.0-21.32                               i386         Linux kernel headers for version 3.5.0 on 32 bit x86 SMP
ii  linux-headers-3.5.0-22                                      3.5.0-22.34                               all          Header files related to Linux kernel version 3.5.0
ii  linux-headers-3.5.0-22-generic                              3.5.0-22.34                               i386         Linux kernel headers for version 3.5.0 on 32 bit x86 SMP
ii  linux-headers-3.5.0-23                                      3.5.0-23.35                               all          Header files related to Linux kernel version 3.5.0
ii  linux-headers-3.5.0-23-generic                              3.5.0-23.35                               i386         Linux kernel headers for version 3.5.0 on 32 bit x86 SMP
ii  linux-headers-3.5.0-24                                      3.5.0-24.37                               all          Header files related to Linux kernel version 3.5.0
ii  linux-headers-3.5.0-24-generic                              3.5.0-24.37                               i386         Linux kernel headers for version 3.5.0 on 32 bit x86 SMP
ii  linux-headers-3.5.0-25                                      3.5.0-25.39                               all          Header files related to Linux kernel version 3.5.0
ii  linux-headers-3.5.0-25-generic                              3.5.0-25.39                               i386         Linux kernel headers for version 3.5.0 on 32 bit x86 SMP
ii  linux-headers-3.5.0-26                                      3.5.0-26.42                               all          Header files related to Linux kernel version 3.5.0
ii  linux-headers-3.5.0-26-generic                              3.5.0-26.42                               i386         Linux kernel headers for version 3.5.0 on 32 bit x86 SMP
ii  linux-headers-3.5.0-27                                      3.5.0-27.46                               all          Header files related to Linux kernel version 3.5.0
ii  linux-headers-3.5.0-27-generic                              3.5.0-27.46                               i386         Linux kernel headers for version 3.5.0 on 32 bit x86 SMP
ii  linux-headers-generic                                       3.5.0.27.43                               i386         Generic Linux kernel headers
ii  linux-headers-generic-pae                                   3.5.0.27.43                               i386         Transitional package

And finally, dpkg -l | grep linux-image:

rc  linux-image-3.2.0-23-generic-pae                            3.2.0-23.36                               i386         Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii  linux-image-3.2.0-30-generic-pae                            3.2.0-30.48                               i386         Linux kernel image for version 3.2.0 on 32 bit x86 SMP
rc  linux-image-3.2.0-31-generic-pae                            3.2.0-31.50                               i386         Linux kernel image for version 3.2.0 on 32 bit x86 SMP
rc  linux-image-3.5.0-27-generic                                3.5.0-27.46                               i386         Linux kernel image for version 3.5.0 on 32 bit x86 SMP

Shouldn't the linux-headers and linux-image packages match? That was also the problem when installing the Nvidia drivers: it couldn't find the package linux-headers-3.2.0-30-generic-pae. It seems the updates somehow got messed up. What can I do about it?

share|improve this answer
    
Oh, it was not that difficult. I installed linux-image-generic-pae, which indeed updated the kernel I'm using. Then I was finally able to install the newest Nvidia drivers. –  crypto_rsa Apr 11 '13 at 20:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.