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

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.


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à :)