failed to load driver: swrast
(2021-08-17)
Problem:
Some variety of
libGL error: MESA-LOADER: failed to open swrast: /usr/lib64/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib64/dri)
libGL error: failed to load driver: swrast
In my case it's some exotic CAD-tool studio thing being displayed across a ssh X-forward onto a vnc desktop, and then presented across a tunneled connection to the user. Any one of these hops could be the problem, but the internet seems to think it's the display-on-vnc one.
Solution:
Stop running tunnelled mesaGL apps.
But If You Can't Do That
I added /usr/lib64/dri to /etc/ld.so.conf.d/mesa.conf (which I created) and then ran ldconfig. Even though none of the drivers showed up subsequently when ldconfig -p was run, the application stopped complaining.