Accidentialy removed icu -> System broke

Hi there,
I was having an issue with updating my system via Pacman. Pacman threw an error while attempting to install updates (via sudo pacman -Syu).
It mentioned that it could not upgrade icu due to a dependancy of electron25.

I looked up this error and found a post mentioning to run “pacman -Rd --nodeps icu”, which I did.
I am aware that I should have looked up (and fully understand) what this does (I since stumbled over “pacman -Rd” in the Arch Wiki, where it said to avoid it), but I have real problems with my inhibition and focus (which I will discuss with my therapist).

Anyways, after rebooting the system, I no longer have access to my DE and pacman broke.
It says “pacman: error while loading shared libraries: libicuuc.so.74: cannot open shared object file: No such file or directory

I had created a snapshot of my system beforehand, but Timeshift fails to launch with the same error as pacman.

Does anyone have an idea on how to reinstall icu?

My system:
Kernel: 6.9.1-arch1-1
DE: Plasma 6
File system: BTRFS
Bootloader: GRUB

1 Like

Coming here with help as I just had this exact same issue and struggled to fix it as nothing I tried worked because of the exact same error you have.

You probably need only to ICU 74.2 source code, but I would get ICU 75.1 too to make sure everything works as intended.
You won’t be able to access these files with any browser if your DE is broken, so you need to use wget to install these files.

Here are the links:
icu 75.1 - https://github.com/unicode-org/icu/releases/download/release-75-1/icu4c-75_1-src.tgz
icu 74.2 - https://github.com/unicode-org/icu/releases/download/release-74-2/icu4c-74_2-src.tgz

try doing this with the 74 first so you do not waste time intalling the newest icu, you will get it from pacman later anyways if everything is fixed

After downloading the source code with wget create a temporary directory and put the tar file in there, then unpack it with “tar xvf” and then cd into “icu” and run:

  1. cd source
  2. ./configure --prefix=/usr
  3. make
  4. sudo make install

ICU 74.2 should install into /usr and now you should be able to update your system

1 Like

You should have removed electron25 for the update to go through. Not icu.

Here is what I would try to fix this:

Boot up the Live ISO and launch a terminal;

In the terminal, replacing /dev/sda2 with the relevant root partition:

sudo mount -t btrfs -o defaults,subvol=@ /dev/sda2 /mnt
sudo mount -t btrfs -o defaults,subvol=@cache /dev/sda2 /mnt/var/cache
sudo mount -t btrfs -o defaults,subvol=@log /dev/sda2 /mnt/var/log
sudo mount -t proc proc /mnt/proc
sudo mount --rbind /sys /mnt/sys
sudo mount --rbind /dev /mnt/dev

sudo pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg -R electron25

sudo pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg -Syu icu

4 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.