全新安装 ubuntu 12.10 后,我在安装 Nvidia 驱动程序时遇到一些问题。
经过一番研究发现,执行时 linux-headers 不会被升级sudo apt-get dist-upgrade
。虽然 linux-image 包已经安装,但我必须手动安装新的标头。
有人知道为什么我会这样吗?这是正常的还是出了什么问题?
答案1
如果您安装的 linux-headers 仅与您正在运行的内核版本匹配,例如 linux-headers-3.5.0-18,则它们将不会被升级。相反,请执行以下操作:
sudo apt-get install linux-headers-generic
每次 linux-image 更新时,-generic header 包都会更新 headers。
答案2
我最近在安装 Nvidia 驱动程序时遇到了类似的问题。我不是 Linux 专家,所以我不知道从哪里开始查找,但有一件事引起了我的注意。当我运行 时uname -r
,我得到
3.2.0-30-generic-pae
然后,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
最后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
不应该Linux 标头和Linux 映像软件包是否匹配?这也是安装 Nvidia 驱动程序时出现的问题:找不到软件包Linux 标头-3.2.0-30-通用-pae。更新似乎出了点问题。我该怎么办?