SNAP9 error: libEGL warning: MESA-LOADER: failed to open swrast

Hi, all

Recently, I update my previously installed SNAP8 to SNAP9 on my Ubuntu 20.04 system. When I open the desktop, there comes out the following error:

libEGL warning: 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, suffix _dri)

Do you know what causes this problem? The previous SNAP8 is fine to use.

This seems to be related to graphics card driver issue.

Maybe this can help you:
python - Cannot load swrast and iris drivers in Fedora 35 - Stack Overflow

More related search results:
Search for MESA-LOADER: failed to open swrast

Thank you for the reply, I will take a look.

Did the Stack Overflow post solve your problem? It could be the same underlying issue as SNAP 9 GUI MESA GLIBCXX error in headless linux server using VNC.

1 Like

Perfect, I found your solution and modify a little bit based on the errors on my server:

first, I have

libEGL warning: 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, suffix _dri)

Then, I found in my server, there is swrast_dri.so in /usr/lib/x86_64-linux-gnu/dri/
so I make a link to the path mentioned above:

ln -s /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so ./dri/

Then, another error comes out again which is the same in https://forum.step.esa.int/t/snap-9-gui-mesa-glibcxx-error-in-headless-linux-server-using-vnc/36797

So I create another link in the dir ~/.snap/auxdata/gdal/gdal-3-2-1/lib :

ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28 ./libstdc++.so.6

or just copy libstdc++.so.6.0.28 to the dir.
Then, the problem is solved.

1 Like