I use the nvidia binary drivers and therefore need those libGL* links in /usr/lib to point to /usr/lib/nvidia-current. But Ubuntu insists on pointing libGL.so.1 (not libGL.so) to libGL.mesa.so whenever I install some opengl related packages.
So far I am fine with always overwriting the wrong link. I would really like to know how I could fix that behaviour, or even where I should look for possible causes of this issue.
EDIT: Maybe I should add that I use nvidia-current from the ubuntu-x-swat ppa:
/u/lib> apt-cache policy nvidia-current
nvidia-current:
Installed: 275.09.07-0ubuntu1~lucid~xup1
Candidate: 275.09.07-0ubuntu1~lucid~xup1
Version table:
*** 275.09.07-0ubuntu1~lucid~xup1 0
500 hxxp://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu/lucid/main Packages
100 /var/lib/dpkg/status
195.36.24-0ubuntu1~10.04 0
500 hxxp://de.archive.ubuntu.com/ubuntu/ lucid-updates/restricted Packages
195.36.15-0ubuntu2 0
500 hxxp://de.archive.ubuntu.com/ubuntu/ lucid/restricted Packages
I need those because my GTX 460 is not supported by the drivers in the official lucid repositories.
~> update-alternatives --display gl_conf
gl_conf - auto mode
link currently points to /usr/lib/nvidia-current/ld.so.conf
/usr/lib/mesa/ld.so.conf - priority 500
slave xorg_extra_modules: /usr/lib/xorg/x11-extra-modules
/usr/lib/nvidia-current/ld.so.conf - priority 9700
slave libvdpau_nvidia.so: /usr/lib/nvidia-current/vdpau/libvdpau_nvidia.so
slave libvdpau_nvidia.so.1: /usr/lib/nvidia-current/vdpau/libvdpau_nvidia.so.1
slave libvdpau_nvidia.so.1_lib32: /usr/lib32/nvidia-current/vdpau/libvdpau_nvidia.so.1
slave libvdpau_nvidia.so_lib32: /usr/lib32/nvidia-current/vdpau/libvdpau_nvidia.so
slave man_nvidiaxconfig.gz: /usr/share/man/man1/alt-nvidia-current-xconfig.1.gz
slave nvidia-autostart.desktop: /usr/share/nvidia-current/nvidia-autostart.desktop
slave nvidia-smi.1.gz: /usr/share/man/man1/alt-nvidia-current-smi.1.gz
slave nvidia_bug_report: /usr/lib/nvidia-current/bin/nvidia-bug-report.sh
slave nvidia_desktop: /usr/share/nvidia-current/ubuntu-nvidia-settings.desktop
slave nvidia_drv: /usr/lib/nvidia-current/xorg/nvidia_drv.so
slave nvidia_modconf: /lib/nvidia-current/modprobe.conf
slave nvidia_smi: /usr/lib/nvidia-current/bin/nvidia-smi
slave nvidia_xconfig: /usr/lib/nvidia-current/bin/nvidia-xconfig
slave xorg_extra_modules: /usr/lib/nvidia-current/xorg
slave xvmcconfig: /usr/lib/nvidia-current/XvMCConfig
Current `best' version is /usr/lib/nvidia-current/ld.so.conf.
~> ls -la /etc/alternatives/gl_conf
lrwxrwxrwx 1 root root 34 2010-09-08 18:51 /etc/alternatives/gl_conf -> /usr/lib/nvidia-current/ld.so.conf
~> cat /usr/lib/nvidia-current/ld.so.conf
/usr/lib/nvidia-current
/usr/lib32/nvidia-current
~>
This is the layout of /usr/lib/libGL symlinks when everything is working correctly:
~> ls -la /usr/lib/libGL*
-rw-r--r-- 1 root root 487480 2010-01-17 08:07 /usr/lib/libGLEW.a
lrwxrwxrwx 1 root root 16 2010-05-02 05:25 /usr/lib/libGLEW.so -> libGLEW.so.1.5.2
lrwxrwxrwx 1 root root 16 2010-05-02 05:22 /usr/lib/libGLEW.so.1.5 -> libGLEW.so.1.5.2
-rw-r--r-- 1 root root 358456 2010-01-17 08:07 /usr/lib/libGLEW.so.1.5.2
lrwxrwxrwx 1 root root 13 2010-09-08 18:25 /usr/lib/libGL.mesa.so -> mesa/libGL.so
lrwxrwxrwx 1 root root 32 2011-07-15 23:34 /usr/lib/libGL.so -> /usr/lib/nvidia-current/libGL.so
lrwxrwxrwx 1 root root 34 2011-07-16 19:01 /usr/lib/libGL.so.1 -> /usr/lib/nvidia-current/libGL.so.1
-rw-r--r-- 1 root root 929838 2010-04-29 07:54 /usr/lib/libGLU.a
lrwxrwxrwx 1 root root 11 2010-05-16 18:38 /usr/lib/libGLU.so -> libGLU.so.1
lrwxrwxrwx 1 root root 20 2010-05-16 18:38 /usr/lib/libGLU.so.1 -> libGLU.so.1.3.070701
-rw-r--r-- 1 root root 461488 2010-04-29 07:54 /usr/lib/libGLU.so.1.3.070701
When I for example remove and install libglfw2 only the libGL.so.1 link changes to point to libGL.mesa.so:
~> sudo apt-get remove libglfw2; sudo apt-get install libglfw-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
libglfw-dev libglfw2
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
[...]
The following extra packages will be installed:
libglfw2
The following NEW packages will be installed:
libglfw-dev libglfw2
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/86.6kB of archives.
After this operation, 360kB of additional disk space will be used.
Selecting previously deselected package libglfw2.
(Reading database ... 727685 files and directories currently installed.)
Unpacking libglfw2 (from .../libglfw2_2.6-2_amd64.deb) ...
Selecting previously deselected package libglfw-dev.
Unpacking libglfw-dev (from .../libglfw-dev_2.6-2_amd64.deb) ...
Setting up libglfw2 (2.6-2) ...
Setting up libglfw-dev (2.6-2) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
~>
Afterwards this is the /usr/lib/libGL* layout:
~> ls -la /usr/lib/libGL*
-rw-r--r-- 1 root root 487480 2010-01-17 08:07 /usr/lib/libGLEW.a
lrwxrwxrwx 1 root root 16 2010-05-02 05:25 /usr/lib/libGLEW.so -> libGLEW.so.1.5.2
lrwxrwxrwx 1 root root 16 2010-05-02 05:22 /usr/lib/libGLEW.so.1.5 -> libGLEW.so.1.5.2
-rw-r--r-- 1 root root 358456 2010-01-17 08:07 /usr/lib/libGLEW.so.1.5.2
lrwxrwxrwx 1 root root 13 2010-09-08 18:25 /usr/lib/libGL.mesa.so -> mesa/libGL.so
lrwxrwxrwx 1 root root 32 2011-07-15 23:34 /usr/lib/libGL.so -> /usr/lib/nvidia-current/libGL.so
lrwxrwxrwx 1 root root 13 2011-07-16 20:15 /usr/lib/libGL.so.1 -> libGL.mesa.so
-rw-r--r-- 1 root root 929838 2010-04-29 07:54 /usr/lib/libGLU.a
lrwxrwxrwx 1 root root 11 2010-05-16 18:38 /usr/lib/libGLU.so -> libGLU.so.1
lrwxrwxrwx 1 root root 20 2010-05-16 18:38 /usr/lib/libGLU.so.1 -> libGLU.so.1.3.070701
-rw-r--r-- 1 root root 461488 2010-04-29 07:54 /usr/lib/libGLU.so.1.3.070701
~>
/usr/lib
- only in/usr/lib/mesa
and/usr/lib/nvidia-current
. Can you please add the output ofupdate-alternatives --display gl_conf
andls -al /etc/alternatives/gl_conf
to your question?/usr/lib/
? I installed the ubuntu-x-swat/x-updates PPA w/o seeing something similar. Installinglibglfw2
also didn't do a thing.libGL.mesa.so
,libGL.so
, andlibGL.so.1
from/usr/lib
and runsudo ldconfig
? Also, does this actually cause any problems?