How do you install opengl on Ubuntu?

[2019.02.14-17.39.51:167][ 0]LogInit: Error: Linux_PlatformCreateOpenGLContextCore - Could not create OpenGL 3.2 context, SDL error: ‘Could not create GL context: GLXBadFBConfig’
[2019.02.14-17.39.51:168][ 0]LogRHI: Error: OpenGL 3.2 not supported by driver
[2019.02.14-17.39.51:173][ 0]LogInit: Error: Linux_PlatformCreateOpenGLContextCore - Could not create OpenGL 3.2 context, SDL error: ‘Could not create GL context: GLXBadFBConfig’

I got that error and I have run it with -opengl3 could someone please help me?
Thanks