qdesjardin: (Default)
[personal profile] qdesjardin
This morning, as I was tinkering with my Arch system, I thought of installing LibreSSL, which is said to be a more secure code-base. So I installed it from the AUR (Arch User Repository), ignoring the fact it said "EXPRIMENTAL ONLY" [sic] in the description.

It broke the majority of my system. So much depends upon OpenSSL, including sudo, and pacman (Arch's package manager). As a result, you can't just re-install OpenSSL back because pacman is going to complain about its broken dependencies.

What can you do?

One method is using the ArchISO. Boot from there, and mount your disk's Arch partition(s) onto /mnt. Then, you can use pacman with the "--sysroot /mnt" parameter (originally I used pacstrap, which worked, but someone on Reddit suggests this method is better as it doesn't risk overwriting all the base files):
  • pacman --sysroot /mnt openssl
Once you have OpenSSL back, do a double-check. Here, I chrooted into the disk's Arch, and did a basic pacman -Syu, along with reinstalling OpenSSL-1.0 (it threw some file dependency errors on the first reinstall, then went smooth after trying it again).

And voila, Arch Linux is back to normal! Of course, you can follow the above procedures if you need to fix something else (i.e. you did an oopsie in sudo, removing pacman of all things! whilst in a drunken LSD-induced fit).