MATLAB: Do I get “MATLAB is selecting “SOFTWARE OPENGL rendering…..” indicating missing x11 libraries when starting MATLAB on a Linux machine

Why do I receive the following error when launching MATLAB?
MATLAB is selecting SOFTWARE OPENGL rendering.Unexpected exception:
'N7mwboost16exception_detail10clone_implINS0_39current_exception_std_exception_wrapperISt13runtime_errorEEEE: Error loading /usr/local/R2020b/bin/glnxa64/matlab_startup_plugins/matlab_graphics_ui/mwuixloader.so. libXt.so.6: cannot open shared object file: No such file or directory:
Success: Success' in createMVMAndCallParser phase 'Creating local MVM'
MATLAB: management.cpp:761: find: Assertion `find: no active context for type 'services::io::TypedMLStream<(mlutil::io::StreamTypeEnum)1>'' failed.
 

Best Answer

The error indicates missing libraries for x11 when attempting to open MATLAB on Linux. 
If you are unable to open MATLAB with the -nodisplay flag on the Linux machine, this is another good indication of the issue. MATLAB requires x11 libraries, even if it is ran with -nodisplay flag.
To resolve the issue, please update x11 libraries. 
The following command works with Ubuntu in regards to updating x11 libraries:
  1. First use the command sudo apt-get update -y
  2. Then use the command sudo apt-get install -y libx11-dev and or sudo apt-get install xorg-dev