You are not logged in.
Well, I’ve found a workaround: if I use the ‘Threads’ parallel profile rather than the ‘Processes’ profile, the parallel pool works without problems. Luckily the code is compatible with both profiles.
My hypothesis at this point is that the newly-created parallel processes are for some reason not finding the correct library versions, so they crash immediately. But I have no idea how to confirm or fix this.
Offline
I was able to get R2025a running using the "patchelf --clear-execstack" advice in the summer, but I just tried to reinstall on a new system and patchelf did't now if I try to launch matlab on that system it brings up the splash screen and the main window, then says "Initializing..." in the status bar for a minute or two, then exits. I tried running it manually, and, knowing it needs MathWorksServiceHost, I ran that manually to see if it would give me any logs (it didn't).
[kousu@bomp ~]$ ~/.MathWorks/ServiceHost/-mw_shared_installs/v2025.2.2.1/bin/glnxa64/MathWorksServiceHost service --realm-id companion@prod@production &
[1] 299515
[kousu@bomp ~]$ matlab
Unable to communicate with required MathWorks services (error 5201).
For help with this issue, contact support:
https://www.mathworks.com/support/contact_us.html
Unable to launch MVM server: License Error: Licensing shutdown
[1]+ Exit 240 ~/.MathWorks/ServiceHost/-mw_shared_installs/v2025.2.2.1/bin/glnxa64/MathWorksServiceHost service --realm-id companion@prod@production
This does suggest to me that whatever patchelf did in the summer isn't good enough anymore.
So I gave up on that and followed @derivativeoflog7's Distrobox advice. I had to figure some things out for myself, but in the end I got it working, and I got it working with R2025b!
(Maybe it's worth mentioning that I'm on a "total headcount" (i.e. institutional academic) license. It's not a network (LAN) nor a personal license file.)
I tried this under both X and Wayland. Both worked.
First, install MATLAB
[test@allium ~]$ pikaur -S --noconfirm matlab-mpm
[test@allium ~]$ mpm install --release=R2025b --matlabroot=~/.local/MATLAB/R2025b MATLAB
Installing with the following parameters:
--destination=/home/test/.local/MATLAB/R2025b
--release=R2025b
--products=MATLAB
---------------------------------------------
The following MathWorks Products are licensed under the The MathWorks, Inc. Software License
Agreement, available in the installation of the MathWorks Product or in the virtual machine image.
MATLAB
Starting install
Products will be installed to: /home/test/.local/MATLAB/R2025b
Finished install
Completing setup...
Installation complete
Then, before letting it run and maybe make messed up config files, I booted into distrobox and installed "task-desktop" so all the GUI libraries matlab might need would be available:
[test@allium ~]$ distrobox create -n matlab --image docker.io/debian:13
Image docker.io/debian:13 not found.
Do you want to pull the image now? [Y/n]: y
Trying to pull docker.io/library/debian:13...
Getting image source signatures
Copying blob cae3b572364a done |
Copying config 61d0976ace done |
Writing manifest to image destination
61d0976aceca49cd8c5a3fb6787ddb08bd43a8f998fef45bf3d1050420161be7
Creating 'matlab' using image docker.io/debian:13 [ OK ]
Distrobox 'matlab' successfully created.
To enter, run:
distrobox enter matlab
[test@allium ~]$ distrobox enter matlab
Starting container... [ OK ]
Installing basic packages... [ OK ]
Setting up devpts mounts... [ OK ]
Setting up read-only mounts... [ OK ]
Setting up read-write mounts... [ OK ]
Setting up host's sockets integration... [ OK ]
Integrating host's themes, icons, fonts... [ OK ]
Setting up distrobox profile... [ OK ]
Setting up sudo... [ OK ]
Setting up user's group list... [ OK ]
Setting up existing user... [ OK ]
Ensuring user's access... [ OK ]
Container Setup Complete!
[test@allium ~]$ sudo apt-get install task-desktop # install everything a GUI could need; overkill, but reliable
Now, at this point, matlab and its dependencies are installed, but MathWorksServiceHost isn't installed; if I run matlab once, it fails but only after installing MathWorksServiceHost:
[test@allium ~]$ ls ~/.config/autostart/
workrave.desktop
[test@allium ~]$ ~/.local/MATLAB/R2025b/bin/matlab
Unable to launch MVM server: License Error: Licensing shutdown
[test@allium ~]$ du -hs ~/.MathWorks/
847M /home/test/.MathWorks/
[test@allium ~]$ ls ~/.config/autostart/
mathworks-service-host.desktop workrave.desktop
[test@allium ~]$ cat ~/.config/autostart/mathworks-service-host.desktop
[Desktop Entry]
Type=Application
Name=Mathworks Service Host
Exec=/home/test/.MathWorks/ServiceHost/-mw_shared_installs/v2025.8.1.1/bin/glnxa64/MathWorksServiceHost service --realm-id companion@prod@production
Terminal=false
I ran it the service manually and then was able to use matlab!
[test@allium ~]$ /home/test/.MathWorks/ServiceHost/-mw_shared_installs/v2025.8.1.1/bin/glnxa64/MathWorksServiceHost service --realm-id companion@prod@production &
[1] 34404
[test@allium ~]$ ~/.local/MATLAB/R2025b/bin/matlab
# at this point, it ran ~/.local/MATLAB/R2025b/bin/glnxa64/MathWorksProductAuthorizer and I signed in to my account
# but it still exited anyway after that?
Unable to launch MVM server: License Error: Licensing shutdown
[1]+ Done /home/test/.MathWorks/ServiceHost/-mw_shared_installs/v2025.8.1.1/bin/glnxa64/MathWorksServiceHost service --realm-id companion@prod@production
[test@allium ~]$
[test@allium ~]$ pgrep -laf Math
33738 /home/test/.MathWorks/ServiceHost/-mw_shared_installs/v2025.8.1.1/bin/glnxa64/MathWorksServiceHost service --realm-id companion@prod@production --detached
33895 /home/test/.MathWorks/ServiceHost/-mw_shared_installs/v2025.8.1.1/bin/glnxa64/MathWorksServiceHost-Monitor --client-id 33738 --realm-id companion@prod@production --lifetime-token 36 -1
34025 /bin/sh /home/test/.local/MATLAB/R2025b/bin/glnxa64/MathWorksProductAuthorizer.sh
34031 /home/test/.local/MATLAB/R2025b/bin/glnxa64/MathWorksProductAuthorizer
[test@allium ~]$
[test@allium ~]$
[test@allium ~]$ ~/.local/MATLAB/R2025b/bin/matlab
The third launch made me sign in again, but it worked after that. It's weird it did that, and it looked like it did it with a UI built into the matlab executable instead of using MathWorksProductAuthorizer, but I'm not going to worry too much. It's working!
It saved my license here, I think:
[test@allium ~]$ ls ~/.matlab/
credentials R2025b
Once I've logged out and back in to my desktop environment, MathWorksServiceHost seems to be happy to spawn via its AutoStart and then authorize me, so I can launch matlab like this:
[test@allium ~]$ distrobox enter matlab -- ~/.local/MATLAB/R2025b/bin/matlab
I'll probably make a wrapper script for that.
Thanks everyone for sharing your experiments!!
Edit to add: I've tried to write a wrapper script. It's not going well. Everything is fine if I do it manually as above but if I script it something gets messed up and the ServiceHost keeps crashing. I also tried installing to /usr/local/MATLAB for a system-wide install but that failed at authorization; I think authorizing a new install to involves writing to the install prefix (for me, specifically, I think it wrote "~/.local/MATLAB/R2025b/licenses/license_info.xml") which means if you want a system-wide install you need to use be root. So, it's probably possible but it's going to be more work to get everything packaged up and reliable.
Last edited by kousu (Today 01:17:49)
Offline