I recently installed Ubuntu 20.04 and MATLAB 2021b. In the middle of running a script, MATLAB crashes (there is nothing wrong with the script as it works perfectly fine in my MATLAB on Windows).
When I type ./matlab
in the terminal, I receive these messages.
MATLAB is selecting SOFTWARE OPENGL rendering.
Gtk-Message: 08:28:19.310: Failed to load module "canberra-gtk-module"
MESA-LOADER: failed to open nouveau: /usr/lib/dri/nouveau_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)
failed to load driver: nouveau
MESA-LOADER: failed to open kms_swrast: /usr/lib/dri/kms_swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)
failed to load driver: kms_swrast
MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)
failed to load swrast driver
After this, MATLAB starts working. But as mentioned earlier, it crashes while running a script. What do I do to stop these failure messages from coming up and/or to stop MATLAB from crashing?