After upgrading to 17.04, when I start LibreOffice, I get the following error messages:
/usr/lib/libreoffice/program/javaldx: error while loading shared libraries: libreglo.so: cannot open shared object file: No such file or directory
Warning: failed to read path from javaldx
/usr/lib/libreoffice/program/soffice.bin: error while loading shared libraries: libreglo.so: cannot open shared object file: No such file or directory
I've tried to completely remove and reinstall the libreoffice
package. I've checked and there are no PPAs in the sources list.
Update: turns out the file libreglo.so
exists in directory /usr/lib/libreoffice/program/
. When I add this directory to LD_LIBRARY_PATH
LibreOffice works. But why is it apparently mis-configured by default?
I faced a similar problem after upgrading. This solution (by disabling java) worked for me:
LibreOffice 5 problems and solutions
Open LibreOffice or any program - Writer, Calc (only one program, settings apply to the whole suite)
I faced the same problem with Ubuntu Artful 17.10. All of the libreoffice programs produced the error listed. Disabling Java made no difference. I tried purging and re-installing Libreoffice and even purging and switching back from the LibreOffice PPA to the default Ubuntu repository did not solve the problem. I also tried removing the libreoffice configuration files in ~/.config
It is clear that LibreOffice is not finding it's libraries and this post set me on the right path to sorting out the library path. Unfortunately simply adding
/usr/lib/libreoffice/program
to LD_LIBRARY_PATH was not enough. LibreOffice still would not run. For me, I had to make sure that/usr/lib/libreoffice/program
was the first library directory that LibreOffice looked at. For bash, this meant adding the following line to the end of.bashrc
export LD_LIBRARY_PATH=:/usr/lib/libreoffice/program:/usr/lib/x86_64-linux-gnu/
and for the UI, it meant editing
/usr/share/applications/libreoffice-writer.desktop
and replacing
with
My naive assumption is that there are some duplicate libraries in LibreOffice and they need their particular flavour to be loaded in order to run.
I fixed it by purging the libreoffice installation
I deleted the directories
I then installed libreoffice as a snap
Currently it is not enough to modify lines with
%U
. This modifies both necessary lines:The simplest solution I have found is to edit the shell-script /usr/bin/soffice and add on the beginning (after the 1st block of comments):