From my understanding, you are trying to use the MATLAB Compiler functionality, specifically the “mcc” workflow, to package a MATLAB script into a standalone executable or a shared library, and then run it on a Linux system with ARM64 architecture.
At the moment, this is not supported. According to the MATLAB Compiler documentation, Linux ARM64 is not a supported target for generating executables or libraries using “mcc”. The MATLAB Runtime that is required to run compiled applications on Linux is only available for the glnxa64 architecture, and it cannot be used on ARM64-based Linux systems.
https://www.mathworks.com/help/compiler/mcc.html#mw_d15d1403-e499-45a0-b3d5-7e57743391b9
This page lists the supported platforms for MATLAB Compiler and confirms that Linux ARM64 is not supported.
To ensure that your MATLAB code can run on ARM64 systems, you may want to explore alternative approaches that do not rely on a platform-specific MATLAB Runtime. One option is to look into workflows that focus on multi-platform portability.
https://www.mathworks.com/help/compiler_sdk/ml_code/ensuring-multi-platform-portability.html
This documentation discusses recommended approaches for improving portability when deploying MATLAB code across different platforms.
I hope this helps!