Ao tentar começar, o Ubuntu 12.04 me responde:
% evince
evince: error while loading shared libraries: libSM.so.6: cannot open shared object file: No such file or directory
Por outro lado, ldd
não apresenta problemas.
% ldd /usr/bin/evince
linux-vdso.so.1 => (0x00007fffa15ff000)
libSM.so.6 => /usr/lib/x86_64-linux-gnu/libSM.so.6 (0x00007f57bdb04000)
libICE.so.6 => /usr/lib/x86_64-linux-gnu/libICE.so.6 (0x00007f57bd8ea000)
libevdocument3.so.4 => /usr/lib/libevdocument3.so.4 (0x00007f57bd6b5000)
...
Suponho que haja um problema ao carregar bibliotecas compartilhadas. libSM
é apenas o primeiro. Pedir ao Ubuntu para ser mais detalhado não trouxe nenhuma ideia para mim.
% export LD_DEBUG=all
% evince
6574:
6574: file=libSM.so.6 [0]; needed by evince [0]
6574: find library=libSM.so.6 [0]; searching
6574: search cache=/etc/ld.so.cache <----- why not found?
6574: search path=/lib/x86_64-linux-gnu/tls/x86_64:/lib/x86_64-linux-gnu/tls:/lib/x86_64-linux-gnu/x86_64:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu/tls/x86_64:/usr/lib/x86_64-linux-gnu/tls:/usr/lib/x86_64-linux-gnu/x86_64:/usr/lib/x86_64-linux-gnu:/lib/tls/x86_64:/lib/tls:/lib/x86_64:/lib:/usr/lib/tls/x86_64:/usr/lib/tls:/usr/lib/x86_64:/usr/lib (system search path)
6574: trying file=/lib/x86_64-linux-gnu/tls/x86_64/libSM.so.6
6574: trying file=/lib/x86_64-linux-gnu/tls/libSM.so.6
6574: trying file=/lib/x86_64-linux-gnu/x86_64/libSM.so.6
6574: trying file=/lib/x86_64-linux-gnu/libSM.so.6
6574: trying file=/usr/lib/x86_64-linux-gnu/tls/x86_64/libSM.so.6
6574: trying file=/usr/lib/x86_64-linux-gnu/tls/libSM.so.6
6574: trying file=/usr/lib/x86_64-linux-gnu/x86_64/libSM.so.6
6574: trying file=/usr/lib/x86_64-linux-gnu/libSM.so.6 <----- why it fails?
6574: trying file=/lib/tls/x86_64/libSM.so.6
6574: trying file=/lib/tls/libSM.so.6
6574: trying file=/lib/x86_64/libSM.so.6
6574: trying file=/lib/libSM.so.6
6574: trying file=/usr/lib/tls/x86_64/libSM.so.6
6574: trying file=/usr/lib/tls/libSM.so.6
6574: trying file=/usr/lib/x86_64/libSM.so.6
6574: trying file=/usr/lib/libSM.so.6
6574:
evince: error while loading shared libraries: libSM.so.6: cannot open shared object file: No such file or directory
Mas
% unset LD_DEBUG
% ls -l /usr/lib/x86_64-linux-gnu/libSM.so.6
lrwxrwxrwx 1 root root 14 lip 25 2012 /usr/lib/x86_64-linux-gnu/libSM.so.6 -> libSM.so.6.0.1
% ls -l /usr/lib/x86_64-linux-gnu/libSM.so.6.0.1
-rw-r--r-- 1 root root 30888 mar 2 2012 /usr/lib/x86_64-linux-gnu/libSM.so.6.0.1
O problema ocorre apenas com o evince. Outros programas são executados sem falhas.
Regenerar /etc/ld.so.cache
não altera nada.
% ldconfig
% ls -l /etc/ld.so.cache
-rw-r--r-- 1 root root 84443 lis 6 17:17 /etc/ld.so.cache
% evince
evince: error while loading shared libraries: libSM.so.6: cannot open shared object file: No such file or directory
gv
depende de libSM
também e é executado sem problemas. Vamos comparar
% gv
6605:
6605: file=libXaw3d.so.6 [0]; needed by gv [0]
6605: find library=libXaw3d.so.6 [0]; searching
6605: search cache=/etc/ld.so.cache
6605: trying file=/usr/lib/x86_64-linux-gnu/libXaw3d.so.6
6605:
6605: file=libXaw3d.so.6 [0]; generating link map
6605: dynamic: 0x00007f1b68327b88 base: 0x00007f1b680d5000 size: 0x000000000025e560
6605: entry: 0x00007f1b680ea9e0 phdr: 0x00007f1b680d5040 phnum: 7
6605:
...
6605: file=libSM.so.6 [0]; needed by /usr/lib/x86_64-linux-gnu/libXt.so.6 [0]
6605: find library=libSM.so.6 [0]; searching
6605: search cache=/etc/ld.so.cache
6605: trying file=/usr/lib/x86_64-linux-gnu/libSM.so.6
6605:
6605: file=libSM.so.6 [0]; generating link map
6605: dynamic: 0x00007f1b66e4fdb8 base: 0x00007f1b66c49000 size: 0x0000000000207158
6605: entry: 0x00007f1b66c4ab20 phdr: 0x00007f1b66c49040 phnum: 7
6605:
...
Aqui loader encontra entrada em seu cache.