Dans le terminal, lorsque je lance la commande cp
, il est indiqué:
The program 'cp' is currently not installed. You can install it by typing:
apt-get install coreutils
Mais lorsque j'essaie de l'installer, j'obtiens les erreurs répertoriées ci-dessous:
depmod: FATAL: could not load /boot/System.map-3.19.0-25-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.19.0-25-generic /boot/vmlinuz-3.19.0-25-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.19.0-25-generic /boot/vmlinuz-3.19.0-25-generic
update-initramfs: Generating /boot/initrd.img-3.19.0-25-generic
grep: /boot/config-3.19.0-25-generic: No such file or directory
WARNING: missing /lib/modules/3.19.0-25-generic
Device driver support needs thus be built-in linux image!
depmod: ERROR: could not open directory /lib/modules/3.19.0-25-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
/usr/sbin/mkinitramfs: 245: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 255: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 255: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 255: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 255: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 255: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 255: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 255: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 255: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 255: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 255: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 255: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 255: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 255: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 269: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 149: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 149: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 173: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 173: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 173: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 173: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 173: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 173: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 173: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 173: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 173: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 149: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 173: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 173: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 149: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 173: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 173: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 294: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 149: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 173: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 173: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 173: /usr/sbin/mkinitramfs: cp: not found
/usr/sbin/mkinitramfs: 173: /usr/sbin/mkinitramfs: cp: not found
/usr/share/initramfs-tools/hooks/fixrtc: 149: /usr/share/initramfs-tools/hooks/fixrtc: cp: not found
E: /usr/share/initramfs-tools/hooks/fixrtc failed with return 127.
update-initramfs: failed for /boot/initrd.img-3.19.0-25-generic with 127.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 127
dpkg: error processing package linux-image-extra-3.19.0-25-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
linux-image-extra-3.19.0-25-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
Sortie de echo $PATH
:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Cela montre simplement que vous ou quelqu'un d'autre (malicieusement) avez altéré la machine en supprimant la commande cp (ou même le package coreutils entier). Cela n'arrive pas avec une utilisation normale.
Sudo mount /dev/sda2 /mnt
(/ dev/sda2 n'est qu'un exemple, ici)Sudo cp /bin/cp /mnt/bin/cp
Sudo umount /mnt && Sudo shutdown -r now
Lorsque vous êtes de nouveau connecté, installez ou réinstallez coreutils pour vous assurer que tout est en ordre.