Fixing WSL errors while generating Linux compatible FMU using FMU Builder

15 次查看(过去 30 天)
I am trying to generate a Linux compatible FMU using FMU Builder for a Simulink model. The windows version of the FMU is generated withour any errors and it works well. But while generating a Linux compatible FMU, I get an error. I have attached a screenshot of the error below.
I have WSL2 installed on my system (5.15.167.4-microsoft-standard-WSL2).
How do I fix this error?
  13 个评论
Swastik Sarkar
Swastik Sarkar 2025-6-25
Please check the contents of the following directory to see if there is any wsl distro.
Additionally please check if you have the permission to write to this folder
fullfile(matlabshared.supportpkg.getSupportPackageRoot(),'toolbox','shared','simulink','fmubuilder')
Ashwin
Ashwin 2025-6-27
I checked the directory and found the distro. But apparently, it was not installed properly (just the distro, not FMU-Builder toolbox). So, I took the assistance of Mathworks support to manually install the distro in the same file path using command prompt. Then I was able to generate the Fmu.

请先登录,再进行评论。

采纳的回答

Ashwin
Ashwin 2025-6-27
The issue was caused by FMU-Builder distro (The WSL distro that comes packaged with FMU Builder toolbox) not getting installed properly. Uninstalling and reinstalling FMU Builder did not fix the issue (I am using FMU Builder Version 24.2.2, maybe this isa glitch in this version itself).
The workaround to the issue is to go to the file path: C/ProgramData/Matlab/SupportPackages/"MatlabVersion"/toolbox/shared/simulink/fmubuilder
and check if the distro folder is available there. If its not, then you need to create a folder called InstallDir and manually install the distro in that file path. This will fix the issue.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Simulink Environment Customization 的更多信息

产品


版本

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by