Matlab installation

The last posting on MatLab is 2022. Any updates since then?
I’m getting the following error when I try to install it:

pblase$ sudo -H ./install
Password:
terminate called after throwing an instance of ‘std::runtime_error’
what(): Failed to launch web window with error: Unable to launch the MATLABWindow application. The exit code was: 127
Aborted

It may be a problem with the root user (since you use sudo) not having the DISPLAY environment variable set, which informs the terminal how/where to draw GUI things.
I haven’t got a system in front of me, but perhaps try sudo -E -H, so that -E preserves the DISPLAY environment variable.
Alternatively, if you log in as the root user (rather than using sudo) it will probably work.
I can’t confirm this is correct, but those would be my steps if I saw the error.

1 Like

Just thinking out loud here but, did you try to actually change into the directory where the install is? Is install looking for something, “what()” ?

Also, did you reach out to mathworks installation team?

As normal user

pblase@clr-df9a0cbb6bd34e079ef626671d1a7b7c~/matlab/bin $ ./matlab
MATLAB is selecting SOFTWARE rendering.
/home/pblase/.MathWorks/ServiceHost/clr-df9a0cbb6bd34e079ef626671d1a7b7c/_tmp_MSHI_f240-358b-d81a-7b0f/mci/_tempinstaller_glnxa64/bin/glnxa64/InstallMathWorksServiceHost: symbol lookup error: /usr/lib64/libcairo.so.2: undefined symbol: xcb_shm_id
/home/pblase/.MathWorks/ServiceHost/clr-df9a0cbb6bd34e079ef626671d1a7b7c/_tmp_MSHI_f240-358b-d81a-7b0f/mci/_tempinstaller_glnxa64/bin/glnxa64/InstallMathWorksServiceHost: symbol lookup error: /usr/lib64/libcairo.so.2: undefined symbol: xcb_shm_id
Unexpected exception: ‘N7mwboost10wrapexceptINS_16exception_detail39current_exception_std_exception_wrapperISt13runtime_errorEEEE: Error loading /home/pblase/matlab/bin/glnxa64/matlab_startup_plugins/matlab_graphics_ui/mwuixloader.so. /usr/lib64/libXt.so.6: undefined symbol: SmcModifyCallbacks: Success: Success’ in createMVMAndCallParser phase ‘Creating local MVM’

As SU

pblase@clr-df9a0cbb6bd34e079ef626671d1a7b7c~/matlab/bin $ sudo -E -H ./matlab
Password:
MATLAB is selecting SOFTWARE rendering.
/root/.MathWorks/ServiceHost/clr-df9a0cbb6bd34e079ef626671d1a7b7c/_tmp_MSHI_970d-9cc5-7bc8-69cd/mci/_tempinstaller_glnxa64/bin/glnxa64/InstallMathWorksServiceHost: symbol lookup error: /usr/lib64/libcairo.so.2: undefined symbol: xcb_shm_id
/root/.MathWorks/ServiceHost/clr-df9a0cbb6bd34e079ef626671d1a7b7c/_tmp_MSHI_970d-9cc5-7bc8-69cd/mci/_tempinstaller_glnxa64/bin/glnxa64/InstallMathWorksServiceHost: symbol lookup error: /usr/lib64/libcairo.so.2: undefined symbol: xcb_shm_id
Unexpected exception: ‘N7mwboost10wrapexceptINS_16exception_detail39current_exception_std_exception_wrapperISt13runtime_errorEEEE: Error loading /home/pblase/matlab/bin/glnxa64/matlab_startup_plugins/matlab_graphics_ui/mwuixloader.so. /usr/lib64/libXt.so.6: undefined symbol: SmcModifyCallbacks: Success: Success’ in createMVMAndCallParser phase ‘Creating local MVM’

The libcairo2 seems to be present and up to date, as far as I can tell. Things seem to be looking for the “sh” command. (BASH?)

I’m executing from the /bin directory.
And yes, I’m talking to the Mathworks team. One problem is that they don’t support ClearLinux, and there seem to be a few differences.

Um, the DISPLAY environment variable doesn’t seem to exist. What should it be?
Oh, found it. It’s “.0”, which should be the main screen.

My gut feeling (and I’m not a Clear Linux expert, but old enough to know when things are more difficult than they need to be) - is the libcairo library mismatch, and you’ll have to figure out what version it needs, with what compile options, and hope that’s the only thing that’s broken.

If you are trying to get work done, I would recommend using a more mainstream/supported Linux distro (eg Ubuntu) so that you don’t have to jump through hoops and figure out all the problems.

I am not belittling ClearLinux, and for some purposes it’s great, but if you’re a student or someone is paying you for your time, it’s better to be focusing on the task at hand and not constantly battling with your operating system. As someone who started Linux with Slackware in the early days, I’ve known the pain of constant battles, and I’m very grateful that Linux Mint “Just Works” for me with almost everything (since it’s basically Ubuntu which has become a sort of de facto standard).

But does Ubuntu work with a AMD Threadripper? I don’t think that it does yet.

I downloaded and installed 2021a, using mpm, and it worked - so far.

got it working, its apparently using its own libX11.so instead of CL’s.
to fix, remove it from ./bin/glnxa64/

i@clr~/Downloads/Matlab/bin/glnxa64 $ mkdir share
i@clr~/Downloads/Matlab/bin/glnxa64 $ mv libX11.* ./share/

then the installer works, probably similar method used after install

After install, same rules apply. can confirm it works

i@clr~ $ cd /usr/local/MATLAB/R2024a/bin/glnxa64/ /*cd to your installation folder*/
i@clr/usr/local/MATLAB/R2024a/bin/glnxa64 $ sudo mkdir share
i@clr/usr/local/MATLAB/R2024a/bin/glnxa64 $ sudo mv libX11.* ./share/

additional notes:

  • figure out where its getting its libX11 using ldd
i@clr~ $ ldd ~/Downloads/Matlab/bin/glnxa64/MATLABWindow | grep libX11
  • this was also the same issue that Steam had, i forget
  • I also got wine to work, though that may not be as desirable