Unable to load driver swrast on CentOS 6

If you encounter the error when you run applications like MATLAB on CentOS 6

libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast

You need to install mesa-libGLU*.x86_64 and mesa-libGLU*.i686

yum install  mesa-libGLU*.i686 mesa-libGLU*.x86_64