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

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.

2 Likes