Why is mclmcrrt9_6.dll not installed with MATLAB Runtime R2019a?

18 次查看(过去 30 天)
Hello,
I am trying to run a .Net Core 3.1 program that uses the MATLAB Runtime (a.k.a MCR) inside a Docker container and it fails with this error message:
The type initializer for 'nDP_Clusteri.cDP_Clustering_Calculation' threw an exception.
at nDP_Clusteri.cDP_Clustering_Calculation..ctor()
at package1.Program.Main(String configPath, String outputPath) in /src/package1/Program.cs:line 22
End of Program
Unhandled exception. System.TypeInitializationException: The type initializer for 'MathWorks.MATLAB.NET.Utility.MWMCR' threw an exception.
---> System.TypeInitializationException: The type initializer for 'MathWorks.MATLAB.NET.Arrays.MWArray' threw an exception.
---> System.DllNotFoundException: Unable to load shared library 'mclmcrrt9_6.dll' or one of its dependencies.
mclmcrrt9_6.dll is the "proxy layer" library for MATLAB Runtime R2019a (v9.6) which is the version I am using. Based on my experience with v9.9 (R2020b), it is supposed to be located at /opt/mcr/v96/runtime/glnxa64 but when I examine my v9.6 container it is not there.
Why is mclmcrrt9_6.dll not located inside my container? How can I fix this?
Below is the Dockerfile that I use to create the container. Am I missing anything?
FROM mcr.microsoft.com/dotnet/runtime:3.1-focal
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get -qq update && apt-get -qq install -y \
unzip \
xorg \
wget && \
curl && \
mkdir /mcr-install && \
mkdir /opt/mcr && \
cd /mcr-install && \
wget https://ssd.mathworks.com/supportfiles/downloads/R2019a/Release/9/deployment_files/installer/complete/glnxa64/MATLAB_Runtime_R2019a_Update_9_glnxa64.zip && \
unzip -q MATLAB_Runtime_R2019a_Update_9_glnxa64.zip && \
./install -destinationFolder /opt/mcr -agreeToLicense yes -mode silent && \
cd / && \
rm -rf mcr-install
ENV LD_LIBRARY_PATH /opt/mcr/v96/runtime/glnxa64:/opt/mcr/v96/bin/glnxa64:/opt/mcr/v96/sys/os/glnxa64:/opt/mcr/v96/extern/bin/glnxa64
Thank you.

回答(1 个)

Chetan
Chetan 2023-9-27
编辑:Chetan 2023-9-27
I understand that you are facing an issue while running in the Docker container and getting the error with the .dll file.
The mclmcrrt9x.dll file is a run-time library required to run MATLAB compiler-generated applications on machines without MATLAB and MATLAB Compiler installed.
This error can occur due to two possible situations:
  1. The correct version of MATLAB Compiler Runtime (MCR) is not installed.
  2. The system's PATH environment variable is not set correctly.
To resolve this issue, you can try the following steps:
  1. Ensure that the correct version of MATLAB Compiler Runtime (MCR) is installed.
  2. Verify that the PATH environment variable is set correctly.
Refer to the MathWorks Documentation that addresses this specific error: https://www.mathworks.com/support/search.html/answers/94298
Follow the troubleshooting steps provided in the documentation.
I hope these suggestions help you resolve the issue you are facing.

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by