Saturday, December 13, 2014

libGL error: failed to load driver: swrast

This error occurred for me running Ubuntu 14.04 LTS with nvidia-331-updates proprietary driver.

SOLUTION

when you run the command  

ldconfig -p | grep libGL.so

you want the output to look like this:

    libGL.so.1 (libc6,x86-64) => /usr/lib/nvidia-331-updates/libGL.so.1
    libGL.so.1 (libc6) => /usr/lib32/nvidia-331-updates/libGL.so.1
    libGL.so (libc6,x86-64) => /usr/lib/nvidia-331-updates/libGL.so
    libGL.so (libc6) => /usr/lib32/nvidia-331-updates/libGL.so


but it doesn't.

go to

cd /etc/ld.so.conf.d

list all of your files in there

ls

check each file

nano filename.conf 

if the file has a line pointing to "/usr/lib/i386-linux-gnu/mesa" replace with "/usr/lib32" or delete the file if another file in the directory already has this then:

sudo ldconfig 

and check the output of

ldconfig -p | grep libGL.so 

attribution: http://askubuntu.com/questions/313173/why-are-my-32bit-opengl-libraries-pointing-to-mesa-instead-of-nvidia-and-how-do