J'utilise Ubuntu 12.04. Je ne peux pas installer ou mettre à jour un paquet que j'ai:
apt-get install traceroute
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
linux-generic : Depends: linux-headers-generic (= 3.2.0.76.90) but 3.2.0.77.91 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Si j'essaie -f
, on me dit que /boot
est plein:
apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
linux-headers-3.2.0-74 linux-image-3.2.0-74-generic linux-headers-3.2.0-74-generic
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
linux-generic linux-headers-generic linux-image-3.2.0-121-generic linux-image-generic
Suggested packages:
fdutils linux-doc-3.2.0 linux-source-3.2.0 linux-tools
The following NEW packages will be installed:
linux-image-3.2.0-121-generic
The following packages will be upgraded:
linux-generic linux-headers-generic linux-image-generic
3 upgraded, 1 newly installed, 0 to remove and 203 not upgraded.
10 not fully installed or removed.
Need to get 0 B/38.8 MB of archives.
After this operation, 151 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
........
dpkg: error processing /var/cache/apt/archives/linux-image-3.2.0-121-generic_3.2.0-121.164_AMD64.deb (--unpack):
failed in write on buffer copy for backend dpkg-deb during `./boot/vmlinuz-3.2.0-121-generic': No space left on device
No apport report written because the error message indicates a disk full error
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.2.0-121-generic /boot/vmlinuz-3.2.0-121-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.2.0-121-generic /boot/vmlinuz-3.2.0-121-generic
Errors were encountered while processing:
/var/cache/apt/archives/linux-image-3.2.0-121-generic_3.2.0-121.164_AMD64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Ma taille /boot
:
/dev/sda1 92M 85M 1.9M 98% /boot
ls -ll
total 76775
-rw------- 1 root root 2884358 Apr 11 2012 System.map-3.2.0-23-generic
-rw------- 1 root root 2897962 Dec 9 2014 System.map-3.2.0-74-generic
-rw------- 1 root root 2898003 Dec 16 2014 System.map-3.2.0-75-generic
-rw------- 1 root root 2898466 Jan 13 2015 System.map-3.2.0-76-generic
-rw-r--r-- 1 root root 791023 Apr 11 2012 abi-3.2.0-23-generic
-rw-r--r-- 1 root root 796535 Dec 9 2014 abi-3.2.0-74-generic
-rw-r--r-- 1 root root 796535 Dec 16 2014 abi-3.2.0-75-generic
-rw-r--r-- 1 root root 796597 Jan 13 2015 abi-3.2.0-76-generic
-rw-r--r-- 1 root root 140279 Apr 11 2012 config-3.2.0-23-generic
-rw-r--r-- 1 root root 140790 Dec 9 2014 config-3.2.0-74-generic
-rw-r--r-- 1 root root 140790 Dec 16 2014 config-3.2.0-75-generic
-rw-r--r-- 1 root root 140790 Jan 13 2015 config-3.2.0-76-generic
drwxr-xr-x 3 root root 7168 Feb 1 2015 grub
-rw-r--r-- 1 root root 14177627 Apr 9 2014 initrd.img-3.2.0-23-generic
-rw-r--r-- 1 root root 14232258 Dec 11 2014 initrd.img-3.2.0-74-generic
-rw-r--r-- 1 root root 14233553 Feb 1 2015 initrd.img-3.2.0-75-generic
drwx------ 2 root root 12288 Nov 21 2013 lost+found
-rw-r--r-- 1 root root 176764 Nov 27 2011 memtest86+.bin
-rw-r--r-- 1 root root 178944 Nov 27 2011 memtest86+_multiboot.bin
-rw------- 1 root root 4965840 Apr 11 2012 vmlinuz-3.2.0-23-generic
-rw------- 1 root root 4990768 Dec 9 2014 vmlinuz-3.2.0-74-generic
-rw------- 1 root root 4991088 Dec 16 2014 vmlinuz-3.2.0-75-generic
-rw------- 1 root root 4991856 Jan 13 2015 vmlinuz-3.2.0-76-generic
J'ai essayé la solution ici et d'autres solutions de purge de vieux noyaux mais j'ai eu l'erreur suivante:
$ uname -r
3.2.0-75-generic
$dpkg --list 'linux-image*' | grep ^ii
ii linux-image-3.2.0-23-generic 3.2.0-23.36 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii linux-image-3.2.0-74-generic 3.2.0-74.109 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
ii linux-image-3.2.0-75-generic 3.2.0-75.110 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
$ apt-get remove linux-image-3.2.0-74-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
linux-generic : Depends: linux-headers-generic (= 3.2.0.76.90) but 3.2.0.77.91 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Toute aide s'il vous plaît?
Modifier:
J'ai essayé la solution ici et supprimé manuellement les anciens noyaux, mais maintenant, j'ai un problème de dépendance différent:
apt-get install -f
......
Generating grub.cfg ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-3.2.0-121-generic
Found initrd image: /boot/initrd.img-3.2.0-121-generic
Found linux image: /boot/vmlinuz-3.2.0-76-generic
Found initrd image: /boot/initrd.img-3.2.0-76-generic
Found linux image: /boot/vmlinuz-3.2.0-75-generic
Found initrd image: /boot/initrd.img-3.2.0-75-generic
Found memtest86+ image: /memtest86+.bin
done
Setting up linux-image-generic (3.2.0.121.136) ...
Setting up linux-headers-generic (3.2.0.121.136) ...
dpkg: dependency problems prevent configuration of linux-generic:
linux-generic depends on linux-image-generic (= 3.2.0.76.90); however:
Version of linux-image-generic on system is 3.2.0.121.136.
linux-generic depends on linux-headers-generic (= 3.2.0.76.90); however:
Version of linux-headers-generic on system is 3.2.0.121.136.
dpkg: error processing linux-generic (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
linux-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
et le noyau actuel est toujours "3.2.0-75-generic"
J'ai utilisé cette question car je ne pouvais installer aucun paquet en raison de dépendances manquantes à cause d'une mise à niveau incorrecte du noyau et que mon /boot
était presque plein, je devais supprimer manuellement les anciennes versions du noyau et les conserver. le dernier:
rm vmlinuz-3.2.0-xx-generic abi-3.2.0-xx-generic config-3.2.0-xx-generic initrd.img-3.2.0-xx-generic System.map-3.2.0-xx-generic
Il n'est pas recommandé de supprimer manuellement les fichiers manuellement, mais je n'ai pas pu utiliser APT ou dpkg
.
Ensuite, j'ai exécuté apt-get install -f
pour corriger les dépendances manquantes et installer complètement le nouveau noyau, mais j'ai eu l'erreur suivante:
dpkg: dependency problems prevent configuration of linux-generic:
linux-generic depends on linux-image-generic (= 3.2.0.76.90); however:
Version of linux-image-generic on system is 3.2.0.121.136.
linux-generic depends on linux-headers-generic (= 3.2.0.76.90); however:
Version of linux-headers-generic on system is 3.2.0.121.136.
dpkg: error processing linux-generic (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
linux-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
Alors je suis passé à cette question qui avait le même problème et j'ai essayé de réinstaller le noyau:
apt-get install --reinstall linux-generic=3.2.0.121.136 -f
Mais j'ai aussi le même problème,
J'ai donc essayé d'utiliser dpkg
:
# ls /var/cache/apt/archives/linux-generic*
/var/cache/apt/archives/linux-generic_3.2.0.121.136_AMD64.deb
# dpkg --install /var/cache/apt/archives/linux-generic_3.2.0.121.136_AMD64.deb
(Reading database ... 860860 files and directories currently installed.)
Preparing to replace linux-generic 3.2.0.121.136 (using .../linux-generic_3.2.0.121.136_AMD64.deb) ...
Unpacking replacement linux-generic ...
Setting up linux-generic (3.2.0.121.136) ...
# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
Et tout a fonctionné normalement,
Merci à tous les commentaires qui m'ont amené à combiner tous ces articles pour résoudre mon problème @ Pilot6, @muru et @ user535733