libGL error: 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)
libGL error: failed to load driver: swrast
WARNING: QOpenGLWidget: Failed to create context WARNING: QOpenGLWidget: Failed to create context WARNING: composeAndFlush: QOpenGLContext creation failed WARNING: composeAndFlush: makeCurrent() failed
解决办法
sudo apt-get update
sudo apt-get install libgl1-mesa-glx libgl1-mesa-dri