Error While Loading Shared Libraries

2 minute read Published

libre2.so.6: cannot open shared object file: No such file or directory.

After upgrading my Invisible Arch box to use the new Deepin Desktop V20 beta I ran into a hiccup trying to start Ungoogled Chromium:

% chromium
/usr/lib/chromium/chromium: error while loading shared libraries: libre2.so.6:
cannot open shared object file: No such file or directory.

What the shit is libre2.so.6? Initial web searches were fruitless so I fell back to GNU IceCat for a minute while I explored Deepin 20’s buttery new interface. Later I found a debugging trick on bugs.archlinux.org to find the problem:

% pacman -Ql re2
re2 /usr/
re2 /usr/include/
re2 /usr/include/re2/
re2 /usr/include/re2/filtered_re2.h
...
re2 /usr/lib/
re2 /usr/lib/libre2.so
re2 /usr/lib/libre2.so.7
re2 /usr/lib/libre2.so.7.0.0
...
re2 /usr/share/
re2 /usr/share/licenses/
re2 /usr/share/licenses/re2/
re2 /usr/share/licenses/re2/LICENSE

Looks like the soname file I’ve got is newer than what Ungoogled Chromium expects. Rather than waiting around for Ungoogled Chromium to catch up I did what Caleb did to “solve” the problem for his GitLab install a couple days back and that was to simply create a symlink for the missing soname file:

(cd /usr/lib; sudo ln -s libre2.so.7 libre2.so.6)

Now, when Chromium looks for libre2.so.6 it finds version 7 instead.

A dirty hack? Yes. Did it bring Ungoogled Chromium back into my life without spending 16 hours trying to rebuild it? Sure did.

Hot tip: If you’re on a slower machine or simply don’t want to burn a whole through your processor trying to build Ungoogled Chromium you can save time and money and by getting the pre-generated package from Chaotic AUR.

Now back to what I was working on besides drooling over Deepin: Reading a Cult of the Dead Cow Newsletter in the After Dark textfile viewer I’m building:

after dark homepage

Filing this post under CRS syndrome in case it happens again.

Advertisement
Ledger Nano X - The secure hardware wallet