Deploying standalone matlab exe on a Linux based server
22 views (last 30 days)
I have deployed the MATLAB generated standalone exe with the latest MATLAB MCR version v 9.3 on a Linux machine which has a MATLAB 2017b installation. It ran as it should.
When I try the same deployment to a 64 bit Linux based server (server does not have a matlab 2017b installation). The server has the MCR V9.3 loaded just as the previous case, I receive the following error message:
"Error using phased.IsotropicAntennaElement
Can't reload '/usr/local/MATLAB/MATLAB_Runtime/v93/bin/glnxa64/libmwcoder_types.so'"
P.S. I have checked the path and system environment variables that need to be set and all of those seem to be fine.
Could anyone please help. Thanks!
Following are the environment variables:
Setting up environment variables
> LD_LIBRARY_PATH is
Kojiro Saito on 26 Oct 2017
Please check if libraries are not missing.
if there is any "not found" library, you need to add the package (using yum install or apt-get depending on the Linux distribution).
More Answers (4)
George Hilliard on 14 Feb 2018
I just ran into this using exactly your setup: MCR 9.3, the Phased Array Toolbox, and Ubuntu 16.04.3. Contrary to the accepted answer, installing xserver-xorg did nothing, and ldd indicated that I had all needed libraries. The failure happens at runtime, apparently when the Phased Array Toolbox (or some subcomponent) is loaded.
Instead, the following seemingly random combination of libraries is needed:
sudo apt install libxt6 libxcomposite1 libfontconfig1 libasound2
I obtained this list through a careful reading of strace output. MathWorks needs to improve the error messages about which library it failed to find.
Alexander Mair on 14 Jan 2021
Just in case it helps someone:
I ran into the same problem (or some alternation of it) when trying to deploy the matlab runtime in a docker container. For me it helped to check all library dependencies.
ldd /opt/mcr/v95/bin/glnxa64/* > /excecute/allDependencies.txt
grep "not found" /execute/allDependencies.txt | sort -t: -u -k1,1 > /execute/notfound.txt
After that I checked one by one which package is needed to install them. For me installing more libraries in the container:
apt-get install libasound2 libatk1.0-0
was needed to get the signal processing toolbox running. Although there were a lot more missing. There are a lot of Dockerfiles out there for MCR that include these libraries and more, so you can also try a Dockerfile that installs more libraries from the beginning.