2

After executing the command libreoffice I am getting the following error message.

/usr/lib/libreoffice/program/soffice.bin: symbol lookup error: /lib/x86_64-linux-gnu/libcairo.so.2: undefined symbol: FT_Done_MM_Var

Starting it from the desktop environment does not show anything.

I tried renaming ~/.config/libreoffice to reset the user settings, but it did not change anything. A new ~/.config/libreoffice folder was created, however.

I started getting this error after I had reinstalled my Ubuntu to the latest version 20.04. I kept my home folder on a separate drive intact, I just formatted the OS drive during the installation.

2 Answers 2

2

Setting the LD_PRELOAD variable to point to a different library solved the problem. Namely, the following command worked for me.

LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libfreetype.so.6 libreoffice

So to be able to run LibreOffice from the desktop environment I added an environment variable export line to ~/.profile.

export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libfreetype.so.6

This solution, however, seems hacky to me. A more proper one will be much appreciated.

4
  • You have to check dynamic linking of the libraries with ldd /lib/x86_64-linux-gnu/libcairo.so.2 and ldd /usr/lib/libreoffice/program/soffice.bin. They should not contain any references to /usr/local/lib.
    – N0rbert
    May 9, 2020 at 10:44
  • @N0rbert thank you for the reply. I have run those commands but found no references to /usr/local/lib.
    – Vic
    May 10, 2020 at 10:13
  • Just guessing - do you have any freetype related libraries in /usr/local/lib?
    – N0rbert
    May 10, 2020 at 10:23
  • @N0rbert my /usr/local/lib is empty.
    – Vic
    May 10, 2020 at 14:41
1

I had a similar issue on ubuntu 20.04, the error was (undefined symbol: FT_Get_Var_Design_Coordinates)

It seems libreoffice is searching for the libfreetype from graalvm. Libreoffice stores the JAVA_HOME setting in a file called javasettings_Linux_X86_64.xml under ~/.config/libreoffice

You can find it by running

find ~/.config/libreoffice -name javasettings_Linux_X86_64.xml

1- Try renaming the file and run libreoffice --calc the file will be generated automatically and this might work.

2- The one that worked for me is to remove javasettings_Linux_X86_64.xml and download java 11 and point JAVA_HOME temporary to java 11 then run libreoffice --calc at the time I used java 8 so a version higher might work as well but I have tried 11. I left the java 11 where it is but point JAVA_HOME back to 8 after (You can leave java 11 if you don't need current java version for other things)

In javasettings_Linux_X86_64.xml file there is the following:

<vendor>AdoptOpenJDK</vendor>
<location>file:///opt/jdk-11.0.4+11</location>
<version>11.0.4</version>

All seems to be working well and I hope it helps someone else.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .