- Instead of just using 'lima', provide the full path to the lima executable.
- You can modify MATLAB's PATH environment variable to include the directory containing lima. You can do this using the ‘setenv’ function in MATLAB. Please make sure to restart MATLAB after modifying the PATH.
Can MATLAB run a Linux binary by Lima VM on MacOs ?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I should run a Linux binary on MacOS. To do it, I installed Lima Virtual Machine (LINK). Now, I can run lima from the terminal (switching to the Linux OS) and than execute the binary with the following lines:
lima % to run the Virtual Machine
./Hydro % to execute the Linux binary
I would like the same with MATLAB. I wrote the following line in the command window:
[~,b] = system('lima ./Hydro')
but the following error occurs:
b =
'/bin/bash: lima: command not found
'
I know that a similar procedure (launch a VM from Matlab and then run a Linux binary is possible on Window OS, the VM is 'wsl').
Can you help me? Or can you give hint or suggestions?
Thanks
0 Kommentare
Antworten (1)
Kshittiz
am 27 Sep. 2023
Hi Nicola,
I understand that you want to run a Linux binary by Lima Virtual Machine on MacOS and you are facing issues while executing it in MATLAB.
It seems like the issue you are encountering is related to MATLAB not recognizing the lima command. This might be because lima is not in the system's PATH when MATLAB is running.
You can try the following workarounds to fix this issue:
To learn more about the ‘setenv’ function, please refer to the following documentation: https://in.mathworks.com/help/matlab/ref/setenv.html
I hope this will help you in fixing the issue.
Regards,
Kshittiz
0 Kommentare
Siehe auch
Kategorien
Mehr zu Environment and Settings finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!