I suffered for 3 days. So now I will make a tutorial for other people so they don’t suffer!
My situation: I tried to install libc6:1386. Big mistake. Erases all things related to libc6:arm64. Including Bash.
Why is bash so important? Well if you don’t have bash- You can’t login (without it rebooting unless your other account is using /bin/sh).
The Fix is: (IW, and other configs don’t work- so give up on those-)
-
Go to the FTP repository for Debian on a seperate computer, download bash for bullseye and all its dependencies! (Suffering)
-
Put them all on a USB drive!
-
Add init=/bin/sh to your boot cmdline.txt on a seperate computer
-
Boot up DietPi.
-
Run # mount -o remount,rw /dev/mmcblk0p2 /
(Mounts main partition (mmcblk0p2) to / (so you can edit files).
6.Plug that usb in! If it doesn’t say sd[a,b,c, etc.] Run # dmesg > dmesg.txt
(Cuz you can Vim text files but can’t scroll in Bourne shell).
Mount /dev/sd[that letter you got earlier] /mnt/usb
-
Now for whatever awful reason you can’t write to the usb so cp those files to somewhere on your machine.
-
Cd to the folder with the files and # dpkg -i [package-name-version]_arm64.deb
-
Now reboot and login! See the magic! Run apt and run the apt fix command it shoves back at you!
Thanks for the suffering Bourne Again SHell! See ya lata!