Can I run an application created with MATLAB Compiler on Linux without X11 or a display?

조회 수: 10 (최근 30일)
I want to create an application with MATLAB Compiler and run it on a Linux machine which does not have a monitor. The machine may not have X11 installed either.

채택된 답변

MathWorks Support Team
MathWorks Support Team 2022년 11월 10일
편집: MathWorks Support Team 2022년 11월 10일
MATLAB Compiler Runtime (MCR) can be installed on a computer which does not have a display. Compiled application should execute as normal. Running MATLAB with no display is a supported configuration on Linux, so this will also work with compiled application. 
An application can be run without a display by using the "-nodisplay" flag at runtime or the "-R -nodisplay" flag at compile time.
It is possible to install the MCR without an X11 server installed by starting the MCR installer in silent mode:
 
 
However, the MCR links to X11 libraries at runtime so it is not possible to run an application without having X11 libraries installed, even if the "-nodisplay" flag is used.
To work around this problem you can either:
1) Install the X11 libraries libXt.so, libXmu.so and libXp.so using the distribution package manager.
2) Include the necessary X11 libraries from the development machine alongside your deployed application. Putting the libraries in the same folder as the application will allow the computer to locate the libraries without altering the library search path.
 
  댓글 수: 1
Jonathan
Jonathan 2014년 4월 4일
You may also compile using "mcc -R -nodisplay ..." so that it will not complain in the absence of an X11 display.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 C Shared Library Integration에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

제품


릴리스

R2014a

Community Treasure Hunt

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

Start Hunting!

Translated by