Wolfram Mathematica after upgrade to Ubuntu 19.04: symbol lookup error: /usr/lib/x86_64-linux-gnu/libfontconfig.so.1: undefined symbol: FT_Done_MM_Var

11,540

Solution 1

As noticed by @steeldriver, the problem is specific to Wolfram Mathematica. I solved the issue by following some of the steps from this question: Can't launch Mathematica 11 on Fedora 29. For the record, I write down here what I did.

Go to MathematicaInstallationDirectory/SystemFiles/Libraries/Linux-x86-64/ (for me it is /usr/local/Wolfram/Mathematica/11.3/SystemFiles/Libraries/Linux-x86-64) and run the following commands:

sudo mv libfreetype.so.6 libfreetype.so.6.bak
sudo mv libz.so.1 libz.so.1.bak

Just to test, I tried to start Mathematica right after renaming the first file, libfreetype.so.6. It did not work and I got the following error:

$ mathematica 
/usr/local/Wolfram/Mathematica/11.3/SystemFiles/FrontEnd/Binaries/Linux-x86-64/Mathematica: /usr/local/Wolfram/Mathematica/11.3/SystemFiles/Libraries/Linux-x86-64/libz.so.1: version `ZLIB_1.2.9' not found (required by /usr/lib/x86_64-linux-gnu/libpng16.so.16)

But after renaming the second file, everything works fine.

NB. The link provided above has more information on other potentially helpful steps.

Solution 2

I also updated my Ubuntu from 18.10 to 19.04 and got the same issue. I managed to repair that thanks to some reading (among which @Yauhen's). Here are the command lines I used:

cd /usr/local/Wolfram/Mathematica/11.3/SystemFiles/Libraries/Linux-x86-64/
sudo mv libfreetype.so.6 libfreetype.so.6.bak
sudo mv libz.so.1 libz.so.1.bak

cd
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get autoremove

sudo apt-get update
sudo apt-get -y install
sudo dpkg --configure -a

et voilà :)

Solution 3

On 5.13.13-arch1-1 (updated September 1 2021) I had same problem.

After searching and not finding a solution, I copied the previous versions of libz and libfreetype from a working installation of Mathematica and pasted them into Mathematica-FOLDER/SystemFiles/Libraries/Linux-x86-64.

Now Mathematica works again.

I have provided the two libraries on this Google drive share.

Answers:

Are the two libraries on the Google drive from your previous versions of libz and libfreetype?

The files are libfreetype.so.6.14.4 and libz.so.1.2.11 I extracted from /usr/lib64/

Somehow I don't feel comfortable loading binary files from someone's Google Drive... O.o

Of course, you could extract of a previous version of archlinux or search on web for these libraries.

What would be more useful is the version compatibility match to be listed. What were/are the versions of the libz and libfreetype, and what is the version of Mathematica, with which they are compatible. Also, what were the versions fo the libraries that were incompatible? Please edit your answer and add that information, if you can. Thanks.

libfreetype.so.6.14.4 and libz.so.1.2.11 Thank you I hope these answers help to solve problems.

Share:
11,540

Related videos on Youtube

Yauhen Yakimenka
Author by

Yauhen Yakimenka

Updated on September 18, 2022

Comments

  • Yauhen Yakimenka
    Yauhen Yakimenka almost 2 years

    I have recently upgraded my desktop PC from Ubuntu 18.10 to 19.04. Now I am getting the following error when I try to start ̶o̶n̶e̶ ̶o̶f̶ ̶m̶y̶ ̶p̶r̶o̶g̶r̶a̶m̶s̶ Wolfram Mathematica 11.3:

    symbol lookup error: /usr/lib/x86_64-linux-gnu/libfontconfig.so.1: undefined symbol: FT_Done_MM_Var
    

    I tried to check this command:

    $ ldd /usr/lib/x86_64-linux-gnu/libfontconfig.so.1
    linux-vdso.so.1 (0x00007fffbd1e9000)
    libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f723c2e6000)
    libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f723c2a9000)
    libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f723c2a0000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f723c27f000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f723c094000)
    libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f723c05d000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f723c03f000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f723c401000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f723bef1000)
    

    But I am not that advanced linux user to understand what all these things mean.

    Has anyone seen this problem?

    • steeldriver
      steeldriver about 5 years
      What exactly is "one of my programs"? is it a program provided by the Ubuntu repositories - or a 3rd party application that you installed from elsewhere?
    • Yauhen Yakimenka
      Yauhen Yakimenka about 5 years
      It's Wolfram Mathematica. Although I don't think it is the problem in the particular program. It was working fine but stopped after the upgrade.
    • steeldriver
      steeldriver about 5 years
      It looks like it is very much a problem with the particular program - see for example Can't launch Mathematica 11 on Fedora 29
    • Yauhen Yakimenka
      Yauhen Yakimenka about 5 years
      Yep, this helped indeed! I will correct the question and post an answer to reflect this.
  • Nash J.
    Nash J. almost 5 years
    I have also updated from 18.04 to 19.04 and then Mathematica was not starting. You trick worked like magic! Thanks a ton!
  • LeChat
    LeChat almost 5 years
    Thanks for your appreciation :)
  • JoKalliauer
    JoKalliauer about 4 years
    Thanks now mathematica start, but adding a subchapter leads to an error/wrong formating. ;-(
  • JoKalliauer
    JoKalliauer about 4 years
    Thanks now mathematica start, but adding a subchapter leads to an error/wrong formating. ;-(
  • Yauhen Yakimenka
    Yauhen Yakimenka about 4 years
    Sorry, which subchapter?..
  • gone
    gone almost 4 years
    Worked a treat !
  • Simon Brady
    Simon Brady over 3 years
    I hit the same problem with Mathematica 10.0.2 on Linux Mint 20 (Ubuntu 20.04-based) and this fix worked for me.
  • Greenonline
    Greenonline almost 3 years
    Are the two libraries on the Google drive from your previous versions of libz and libfreetype?
  • Yauhen Yakimenka
    Yauhen Yakimenka almost 3 years
    Somehow I don't feel comfortable loading binary files from someone's Google Drive... O.o
  • Greenonline
    Greenonline almost 3 years
    What would be more useful is the version compatibility match to be listed. What were/are the versions of the libz and libfreetype, and what is the version of Mathematica, with which they are compatible. Also, what were the versions fo the libraries that were incompatible? Please edit your answer and add that information, if you can. Thanks.