Deploying standalone matlab exe on a Linux based server

조회 수: 29 (최근 30일)
yogesh nijsure
yogesh nijsure 2017년 10월 24일
답변: Austin Healy 2021년 11월 24일
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
>> ./:/usr/local/MATLAB/MATLAB_Runtime/v93/resources/siglib:/usr/local/MATLAB/MATLAB_Runtime/v93/runtime/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v93/bin/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v93/sys/os/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v93/sys/opengl/lib/glnxa64
_________________________________________________________________________________________________________>

채택된 답변

Kojiro Saito
Kojiro Saito 2017년 10월 26일
Please check if libraries are not missing.
In terminal,
ldd /usr/local/MATLAB/MATLAB_Runtime/v93/bin/glnxa64/libmwcoder_types.so
if there is any "not found" library, you need to add the package (using yum install or apt-get depending on the Linux distribution).
  댓글 수: 8
Kojiro Saito
Kojiro Saito 2017년 12월 7일
Some x libraries might be missing but I have no idea what exactly is the one. I have confirmed that after installing xserver-org by the following in Ubuntu 16.04.1 Server, my compiled application works.
sudo apt-get -y install xserver-xorg
Also, in some cases, install java-1.7.0-openjdk solved this issue in RHEL7.
Amanda Dash
Amanda Dash 2017년 12월 7일
Switching from Oracle Java to the OpenJDK worked for me.

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

추가 답변 (4개)

George Hilliard
George Hilliard 2018년 2월 14일
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.

Nikolaos Kallistis
Nikolaos Kallistis 2018년 3월 20일
편집: Nikolaos Kallistis 2018년 3월 20일
I got the same error:
Can't reload '../MATLAB/R2018a/bin/glnxa64/libmwcoder_types.so'
Installing openjdk-7-jdk looks it solved the issue.
sudo apt-get install openjdk-7-jdk
I am running MATLAB 2018a at linux (Xfce 4.10).
  댓글 수: 1
Mikhail Milchenko
Mikhail Milchenko 2021년 4월 8일
Installing java worked for me as well on CentOS 7:
sudo yum -y install java

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


Alexander Mair
Alexander Mair 2021년 1월 14일
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.

Austin Healy
Austin Healy 2021년 11월 24일
Renaming libmwcoder_types.so to libmwcoder_types_old.so solved the problem in my case. I'm not using the Matlab coder

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by