Nvidia driver conflicts with Mesa libraries

I’m running 64 bit Fedora 20 with the akmod-nvidia driver package. When I tried to run Google Webdesigner I got the following error

libGL error: failed to load driver: swrast

I’ve seen this before when trying to use Lightworks. The work around is to uninstall the mesa-libGl libraries,
rpm -e mesa-libGL.i686 --nodeps
rpm -e mesa-libGL.x86_64 --nodeps

This bug has been around for a long time in a lot of distributions. It needs to be addressed and it’s Nvidia’s job to do it because their driver is closed source.

Seems like you’re on a 64bit Fedora and you just didn’t install full NVIDIA drivers (that is with a 32bit part/support).

Don’t blame NVIDIA just yet.

The nvidia .run installer simply replaces some system libs with its own copies, which works but isn’t really healthy from a distribution POV, simply because when the packages that ship those libs are updated things are bound to go wrong.

Most distros that ship the nvidia nonfree driver employ ways to make it work without replacing system libs; for example in Mandriva and Mageia they employ the alternatives system to load the libs from the nonfree nvidia driver; in Fedora, the nvidia packages from the rpmfusion repos ship /etc/ld.so.conf.d/nvidia-lib64.conf in xorg-x11-drv-nvidia-libs (and /etc/ld.so.conf.d/nvidia-lib.conf in the i686 package) which make /usr/lib64/nvidia/ precede /usr/lib64/ so /usr/lib64/nvidia/libGL.so.1 is preferred over /usr/lib64/libGL.so.1.

On my system:

ldconfig -p | grep libGL.so
        libGL.so.1 (libc6,x86-64) => /usr/lib64/nvidia/libGL.so.1
        libGL.so.1 (libc6,x86-64) => /lib64/libGL.so.1

the nvidia rpm packages execute ldconfig from an rpm post-install script; somehow this didn’t work on your system, maybe when you upgraded the nvidia pacakges.

I think executing ldconfig as root should fix things on your system without having to uninstall those mesa* packages.

Google stuff is pretty lame, it’s probably got a hard coded path to libGL.

I haven’t used google web designer before, but I think they’ll either be shipping their own copy of libGL or relying on the system-provided libs; if it’s the latter then ld will/should load the nvidia libGL just like it does for all other apps.

There is a simple solution, modify the LD_LIBRARY_PATH env variable

setenv LD_LIBRARY_PATH /usr/lib64/nvidia:${LD_LIBRARY_PATH}