Unable to launch Libreoffice on Ubuntu

If I try to launch Libre Calc, or any Libre program, I see the splash screen for a second, but then it crashes with the error:

The application cannot be started.
The component manager is not available.
("Cannot open uno ini file:///usr/lib/x86_64-linux-gnu/unorc at /build/libreoffice-t5qziU/libreoffice-7.6.2~rc1/cppuhelper/source/defaultbootstrap.cxx:53")

I recently rebooted my system, but I haven’t otherwise changed or upgraded anything, so I don’t know why libraries would suddenly be missing.

How do I fix this?

Edit: In my ~/.bash_aliases is had:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu/jni:/usr/lib/libreoffice/program/

and if I revert that, then Libreoffice launches, but it also disables all Java, which makes the UI render like it’s 1991, and also disables all other Java programs on my system.

The UI does not depend on Java (in fact most of LibreOffice doesn’t except a Base database reporting engine and maybe some extensions). More likely you disabled finding the gtk3 backend with that, which in itself is odd enough. However, it shouldn’t be necessary to have /usr/lib/libreoffice/program/ in LD_LIBRARY_PATH. As you mentioned Ubuntu, are you running a packaged version (e.g. from PPA), or a snap version?

I’m using the PPA version.

There seems to be something broken in your installation. I’d suggest to remove /usr/lib/libreoffice/program/ from LD_LIBRARY_PATH and using apt or aptitude force reinstall of the libreoffice-gnome and libreoffice-gtk3 packages. If that doesn’t help, force reinstall of all libreoffice packages. If that doesn’t help, remove all libreoffice* packages (caveat, there may be a dependency of gnome on libreoffice-gnome (I never understood why Debian does that) that when forcing the removal of libreoffice-gnome would also remove your gnome desktop … so exclude that if necessary or somehow work around) and then reinstall, and make sure that the new libreoffice-gnome and libreoffice-gtk3 are installed along.

Like I said, I already removed /usr/lib/libreoffice/program/ from my LD_LIBRARY_PATH, as well as the other two entries. I only had added it to fix a different error, as suggested by this post, which it did but only resulted in a different error.

I’ve already tried purging all libreoffice* packages and reinstalling, but that had no effect.

Other than Libreoffice looking like garbage, I’m not completely unhappy with the loss of Java. Libreoffice actually runs quite a bit faster now, and doesn’t lock up as much as it used to. I guess Java’s quite the inefficient memory hog.

FWIW, here’s how I fixed this.

First create a new user and log in as them. See if libreoffice works.

If that’s the case then it’s a user-based configuration error as it was for me.

I did rm -fr $HOME/.config/libreoffice and then unset LD_LIBRARY_PATH and it worked on my end.

However! My solution is not your solution necessarily! If you can repeat the new user test that I outlined above then the hypothesis of it being user environment specific is well supported and you should proceed by looking at the environment variable differences along with running something like strace libreoffice | grep $HOME and see what local files it may be looking at.

Good luck

1 Like

Hello Cerin1

I suggest using LibreOffice as a Flatpak, which you can find on flathub.org.

I used LibreOffice as a Flatpak for well over a year on an official flavour of Ubuntu, before I moved to a Debian-based Distribution in Q3 of this year. I had no problems, and was always using the latest version published on flathub.

If you choose to use the Flatpak, you may find uninstalling the Ubuntu pre-installed version of LibreOffice makes sense.

I continue to use LibreOffice as a Flatpak on the Debian-based distribution