Matlab crashed on start on Fedora 36

조회 수: 70 (최근 30일)
Hyma Harish Vallabhapurapu
Hyma Harish Vallabhapurapu 2022년 4월 19일
답변: Joshua Rhodes 2023년 8월 25일
As title suggests, matlab crashes when launched form the terminal on Fedora 36. There are lots of Java errors. the version of Matlab I am using is 2021b. See attached image for error. Running ./bin/glnxa64/MATLABWindow gives the error symbol lookup error: /lib64/libcairo.so.2: undefined symbol: FT_Get_Color_Glyph_Layer
For reference, matlab worked fine on Fedora 35. I had upgraded just two days earlier.
  댓글 수: 1
Riccardo Scorretti
Riccardo Scorretti 2022년 4월 21일
Up to my (limited) experience, this could be due to an incompatibility between the libraries shipped with MATLAB and the ones installed in the system. Usually this kind of very nasty problem can be solved either by removing the version of the library shipped with MATLAB, or by downgrading the cluprit library.
Assuming that the library which is at the origin of the problem is libcairo.so.2, which is not shipped with MATLAB, you can try the following procedure:
  1. download the previous version of the library from https://download-ib01.fedoraproject.org/pub/fedora/linux/releases/35/Everything/aarch64/os/Packages/c/cairo-1.17.4-4.fc35.aarch64.rpm. It should be a file named cairo-1.17.4-4.fc35.aarch64
  2. Extract the file (don't install, just extract it) and copy the file libcairo.so.2.11704.0 somewhere (personally I would copy it into /usr/lib64)
Now, I would like to run MATLAB by using: LD_PRELOAD=/usr/lib64/libcairo.so.2.11704.0 matlab. Unfortunately I get the error:
ERROR: ld.so: object 'libcairo.so.2.11704.0_copy' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
I think that if you manage to solve this problem and preload the version of the library shipped with F35, your problem could be solved. I hope it helps.

댓글을 달려면 로그인하십시오.

답변 (6개)

Trevor Vannoy
Trevor Vannoy 2022년 6월 28일
There's no need to downgrade libcairo to the Fedora 35 version. According to the Arch Wiki The issue stems from the version of libfreetype that ships with MATLAB.
I fixed the issue by setting aside MATLAB's libfreetype.so.6.16.0 library, then symlinking to my system's libfreetype.s0.6:
cd /usr/local/MATLAB/R2022a/bin/glnxa64
sudo mv libfreetype.so.6.16.0{,.bak}
sudo ln -sf /lib64/libfreetype.so.6 libfreetype.so.6
  댓글 수: 1
Mikael
Mikael 2023년 2월 19일
This seemed to solve my problems for R2023b but I later found that I could not start
simulink, got error
Caught std::exception Exception /usr/local/MATLAB/R2022b/bin/glnxa64/libmwdastudio.so
when starting simulink.
So finally I had to downgrade cairo to F35 status as described below.

댓글을 달려면 로그인하십시오.


Anil GURSES
Anil GURSES 2022년 5월 1일
I solved the problem by downgrading libcairo and dependent packages. You can use the command below,
sudo dnf install cairo-1.17.4 --releasever=35
If you still encounter an error, try to link /lib64/libcairo.so to /lib64/libcairo.so.2.
sudo ln -s /lib64/libcairo.so /lib64/libcairo.so.2
I hope this helps.
  댓글 수: 3
Anil GURSES
Anil GURSES 2022년 5월 7일
Hi Mark,
You can install R2022a by just removing libfreetype.so.6 from the installer setup files. Go to your matlab installer directory and run the command below,
rm ./bin/glnxa64/libfreetype.so.6*
Ref. wiki
Julio Larco
Julio Larco 2022년 5월 14일
편집: Julio Larco 2022년 5월 14일
Only remove files " rm libfreetype.so.6*" of the installer. I don't remember where I saw that, but this works for me.

댓글을 달려면 로그인하십시오.


Viktor Erdelyi
Viktor Erdelyi 2022년 5월 16일
I'm using 2022a, but I managed to fix the issues by moving/removing the following files
  • mv sys/opengl sys/opengl_BAK
  • rm sys/os/glnxa64/libstdc++*
  • rm bin/glnxa64/libfreetype*
  댓글 수: 1
Chandram
Chandram 2022년 9월 25일
This absolutely works on R2022b

댓글을 달려면 로그인하십시오.


Clemens
Clemens 2022년 9월 26일
편집: Clemens 2022년 9월 26일
On an up to date debian sid system, this works for me (thanks to Trevor and Victor, see above their posts):
  • copy iso image to a directory A
  • cd A
  • rm bin/glnxa64/libfreetype*
  • rm sys/os/glnxa64/libstdc++.so.6*
  • cd bin/glnxa64/
  • ln -sf /usr/lib/x86_64-linux-gnu/libfreetype.so.6 libfreetype.so.6
  • cd ../.. # change again to directory A
  • ./install
After that the installer window opens and I can install and run matlab r2022b.

Cristian Le
Cristian Le 2022년 6월 21일
Is this issue still prevelant in R2022b? Pinning cairo to an old releasever is not an ideal solution for the users.
  댓글 수: 2
Trevor Vannoy
Trevor Vannoy 2022년 6월 28일
You don't need to downgrade cairo. See my answser: https://www.mathworks.com/matlabcentral/answers/1699735-matlab-crashed-on-start-on-fedora-36#answer_995890
Mikael
Mikael 2023년 2월 19일
It seems you need to downgrade to libcairo, Fedora 35-status, if you are also intending to use simulink, unfortunately,
as of my testing and web search. See my above comment.

댓글을 달려면 로그인하십시오.


Joshua Rhodes
Joshua Rhodes 2023년 8월 25일
You could also try using distrobox and podman to create an ubuntu container and running Matlab in that. (Ubuntu is one of the guaranteed supported distros.)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by