Ошибка! Не удается найти заголовки ядра для ядра 3.5.0-25-generic

Я запускаю dist-upgrade, и я закончил с этой ошибкой:

Ошибка! Невозможно найти заголовки ядра для ядра 3.5.0-25-generic.

Пожалуйста, установите пакет linux-headers-3.5.0-25-generic,

или используйте параметр –kernelsourcedir, чтобы сообщить DKMS, где он находится

run-parts: выполнение /etc/kernel/postinst.d/initramfs-tools 3.5.0-25-generic / boot / vmlinuz-3.5.0-25-generic`

Я установил dkms xserver-xorg xserver-xorg-core

Я пробовал эти вопросы

Невозможно установить VirtualBox на Ubuntu 12.10: заголовки ядра не могут быть найдены и

Ошибка: заголовки ядра не найдены. (Но они на месте) Но не очень помогли

Ниже приведен результат:

 suhaib@suhaib-sda8:~$ sudo apt-get dist-upgrade Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following NEW packages will be installed: linux-image-3.5.0-25-generic linux-image-extra-3.5.0-25-generic The following packages will be upgraded: linux-image-generic 1 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 39.6 MB of archives. After this operation, 153 MB of additional disk space will be used. Do you want to continue [Y/n]? Y Get:1 http://ca.archive.ubuntu.com/ubuntu/ quantal-updates/main linux-image-3.5.0-25-generic amd64 3.5.0-25.39 [11.9 MB] Get:2 http://ca.archive.ubuntu.com/ubuntu/ quantal-updates/main linux-image-extra-3.5.0-25-generic amd64 3.5.0-25.39 [27.7 MB] Get:3 http://ca.archive.ubuntu.com/ubuntu/ quantal-updates/main linux-image-generic amd64 3.5.0.25.31 [2,442 B] Fetched 39.6 MB in 13s (2,894 kB/s) Selecting previously unselected package linux-image-3.5.0-25-generic. (Reading database ... 142958 files and directories currently installed.) Unpacking linux-image-3.5.0-25-generic (from .../linux-image-3.5.0-25-generic_3.5.0-25.39_amd64.deb) ... Done. Selecting previously unselected package linux-image-extra-3.5.0-25-generic. Unpacking linux-image-extra-3.5.0-25-generic (from .../linux-image-extra-3.5.0-25-generic_3.5.0-25.39_amd64.deb) ... Preparing to replace linux-image-generic 3.5.0.17.19 (using .../linux-image-generic_3.5.0.25.31_amd64.deb) ... Unpacking replacement linux-image-generic ... Setting up linux-image-3.5.0-25-generic (3.5.0-25.39) ... Running depmod. ^[[1;3B^[[1;3Bupdate-initramfs: deferring update (hook will be called later) Examining /etc/kernel/postinst.d. run-parts: executing /etc/kernel/postinst.d/dkms 3.5.0-25-generic /boot/vmlinuz-3.5.0-25-generic **Error! Your kernel headers for kernel 3.5.0-25-generic cannot be found. Please install the linux-headers-3.5.0-25-generic package, or use the --kernelsourcedir option to tell DKMS where it's located run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.5.0-25-generic /boot/vmlinuz-3.5.0-25-generic** update-initramfs: Generating /boot/initrd.img-3.5.0-25-generic run-parts: executing /etc/kernel/postinst.d/pm-utils 3.5.0-25-generic /boot/vmlinuz-3.5.0-25-generic run-parts: executing /etc/kernel/postinst.d/update-notifier 3.5.0-25-generic /boot/vmlinuz-3.5.0-25-generic run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.5.0-25-generic /boot/vmlinuz-3.5.0-25-generic Generating grub.cfg ... Found linux image: /boot/vmlinuz-3.5.0-25-generic Found initrd image: /boot/initrd.img-3.5.0-25-generic Found linux image: /boot/vmlinuz-3.5.0-17-generic Found initrd image: /boot/initrd.img-3.5.0-17-generic Found memtest86+ image: /boot/memtest86+.bin Found Windows 7 (loader) on /dev/sda1 Found Ubuntu 12.10 (12.10) on /dev/sda6 Found Ubuntu 12.04.1 LTS (12.04) on /dev/sda7 done Setting up linux-image-extra-3.5.0-25-generic (3.5.0-25.39) ... Running depmod. update-initramfs: deferring update (hook will be called later) Examining /etc/kernel/postinst.d. run-parts: executing /etc/kernel/postinst.d/dkms 3.5.0-25-generic /boot/vmlinuz-3.5.0-25-generic Error! Your kernel headers for kernel 3.5.0-25-generic cannot be found. Please install the linux-headers-3.5.0-25-generic package, or use the --kernelsourcedir option to tell DKMS where it's located run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.5.0-25-generic /boot/vmlinuz-3.5.0-25-generic update-initramfs: Generating /boot/initrd.img-3.5.0-25-generic run-parts: executing /etc/kernel/postinst.d/pm-utils 3.5.0-25-generic /boot/vmlinuz-3.5.0-25-generic run-parts: executing /etc/kernel/postinst.d/update-notifier 3.5.0-25-generic /boot/vmlinuz-3.5.0-25-generic run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.5.0-25-generic /boot/vmlinuz-3.5.0-25-generic Generating grub.cfg ... Found linux image: /boot/vmlinuz-3.5.0-25-generic Found initrd image: /boot/initrd.img-3.5.0-25-generic Found linux image: /boot/vmlinuz-3.5.0-17-generic Found initrd image: /boot/initrd.img-3.5.0-17-generic Found memtest86+ image: /boot/memtest86+.bin Found Windows 7 (loader) on /dev/sda1 Found Ubuntu 12.10 (12.10) on /dev/sda6 Found Ubuntu 12.04.1 LTS (12.04) on /dev/sda7 done Setting up linux-image-generic (3.5.0.25.31) ... 

Попробуй это:

sudo apt-get install linux-headers-$(uname -r)