Eu uso os drivers binários nvidia e, portanto, preciso desses links libGL * em / usr / lib para apontar para / usr / lib / nvidia-current. Mas o Ubuntu insiste em apontar libGL.so.1 (não libGL.so) para libGL.mesa.so sempre que eu instalar alguns pacotes relacionados a opengl.
Até agora estou bem em sempre sobrescrever o link errado. Eu realmente gostaria de saber como eu poderia consertar esse comportamento, ou até mesmo onde eu deveria procurar as possíveis causas deste problema.
EDIT: Talvez eu deva acrescentar que eu uso nvidia-current do ppa do ubuntu-x-swat:
/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
Eu preciso disso porque minha GTX 460 não é suportada pelos drivers nos repositórios lúcidos oficiais.
~> 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
~>
Este é o layout dos links simbólicos / usr / lib / libGL quando tudo está funcionando corretamente:
~> 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
Quando, por exemplo, removo e instalo o libglfw2, apenas o link libGL.so.1 muda para apontar para 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
~>
Depois disso, este é o layout / usr / lib / libGL *:
~> 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
~>