MATLAB Licence using both Window11 and WSL2

13 ビュー (過去 30 日間)
Chenguang Wan
Chenguang Wan 2022 年 4 月 14 日
回答済み: Felipe Calliari 2022 年 6 月 20 日
I have install the matlab 2021a on window11 and wsl2. But in WSL2 I got
MATLAB is selecting SOFTWARE OPENGL rendering.
License checkout failed.
License Manager Error -9
The hostid of your computer ("00155de21a38 6a0b4012aaac") does not match the hostid of the license
file (00155db048ba).
To run on this computer, you must run the Activation client to reactivate your license

回答 (1 件)

Felipe Calliari
Felipe Calliari 2022 年 6 月 20 日
Hi, Chenguang Wan.
It is possible to use MATLAB inside WSL2, the problem is that everytime you open WSL2 its MAC Address changes! And your license is linked to it.
The solution is edit ".bash_profile" and add a few lines. On Linux, type:
$ nano ~/.bash_profile
Then insert these lines:
wantmac=00:15:aa:ad:aa:aa
mac=$(ip link show bond0 | awk '/ether/ {print $2}')
if [[ $mac != $wantmac ]]; then
sudo ip link set dev bond0 address $wantmac
fi
Now you just need to activate your MATLAB again and it will work!
Reference: https://github.com/microsoft/WSL/issues/5866

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

タグ

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by