Score:0

Failure to load modules and drivers in Ubuntu 20.04

eg flag

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?

Pilot6 avatar
cn flag
Install Nvidia drivers.
Score:0
cn flag

I have matlab 2021b and Ubuntu 20.04 and received the same error (plus some others) when opening matlab.I did these two things and it got rid of the error related to the "acnberra-gtk-module":

  1. Make sure canberra-gtk-module is installed: sudo apt install libcanberra-gtk-module
  2. before running matlab type: export GTK_PATH=/usr/lib/x86_64-linux-gnu/gtk-2.0
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.