Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4909

Raspberry Pi OS • Re: apt-get not working any more

$
0
0
If you have a second SDCard you can boot that. Mount the broken SDCard in a USB reader, insert that into your RPi.

sudo mount /dev/sdb2 /mnt

Then copy the missing/broken library from the rescue system to your live system.
sudo cp /lib/aarch64-linux-gnu/libxxhash.so.0 /mnt/lib/aarch64-linux-gnu/libxxhash.so.0
You can copy anything else that's broken or missing at this point.

Then build a chroot with
sudo mount /dev/sdb1 /mnt/boot
sudo mount -t proc /proc /mnt/proc
sudo mount -o bind /dev /mnt/dev
sudo mount -o bind /sys /mnt/sys


And activate that with
cd /mnt
sudo chroot .
(Note that full stop, that's important.)

You should then be able to run
sudo apt update
sudo apt dist-upgrade -y
exit

to check the live system is working and update it.

Then power down. Switch the SDCard back and reboot as normal.

Statistics: Posted by DougieLawson — Wed Sep 18, 2024 8:50 pm



Viewing all articles
Browse latest Browse all 4909

Trending Articles