Install libosmesa6 by entering the following commands in the terminal:
sudo apt update sudo apt install libosmesa6
Mesa Off-screen rendering extension
OSmesa is a Mesa extension that allows programs to render to an off-screen buffer using the OpenGL API without having to create a rendering context on an X Server. It uses a pure software renderer. . This package provides both 16-bit and 32-bit versions of the off-screen renderer which do not require external libraries to work.