Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

After I run this command dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P

I got the problem while opening smplayer,cairo-dock,unity-2d-shell and amdconfig ,"error while loading shared libraries: open shared object file: No such file or directory". Maybe there are other applications would meet the same problem.

But I do have the file


ldd $(which unity-2d-shell)|grep libGL => not found        
ldd $(which mplayer)|grep not => not found


ldd $(which smplayer)|grep libGL  

got nothing.

share|improve this question
up vote 1 down vote accepted

@Braiam is spot on. You should also know that finding a file with locate does not mean it exists. locate uses a database that is refreshed every now and then. It does not search the actual file systsem but it's database. You can run updatedb to refresh the database before searching or use the -e flag:

-e, --existing
     Print only entries that refer to files existing at the time locate is run.

For example:

$ touch stupid_stupid_file.txt
$ locate stupid_stupid_file.txt   ## No results
$ sudo updatedb                   ## refresh database
$ locate stupid_stupid_file.txt
/home/terdon/stupid_stupid_file.txt  ## the file was found after updatedb
$ rm stupid_stupid_file.txt          ## delete the file
$ locate stupid_stupid_file.txt
/home/terdon/stupid_stupid_file.txt   ## the file is still in the database 
$ locate -e stupid_stupid_file.txt   ## the file is not found using -e
share|improve this answer
It's weird. I have rebooted. But it seems like didn't update the database. And after that, it turns out that that package dose not exists. But using "apt-get install" , I can't find that package. Using "apt-file search", many package include this lib, and how can i install that lib correctly? – Ziu Oct 4 '13 at 3:06
@Ziu you need to run updatedb to update the database, rebooting is irrelevant. Anyway, check the dependencies of mplayer: apt-cache depends mplayer | grep -i libgl that will return the packages that mplayer depends on. One of them should be libgl1-mesa-glx. – terdon Oct 4 '13 at 3:18
Finally fix it. It is libgl1-mes-glx, but when I try to install that, it reminds me have installed the latest version. Then I thought that maybe it is something wrong with the graphics drive. So i uninstall it, and it works correctly. and the => /usr/lib/x86_64-linux-gnu/mesa/ (0x00007f1e83fa7000). Then i install the amd drive again, and it still works. But the dependency changes. => /usr/lib/ (0x00007fe24e687000) . Thanks – Ziu Oct 5 '13 at 8:57

It's probably because some linked libraries got broken when you uninstalled several package at once. You should have run dpkg -l |grep ^rc|awk '{print $2}' before hand to know what will happen. Luckily this can be solved using sudo ldconfig. This recreates the linked libraries cache and will (hopefully) fix your libraries.

Of course, that will only works if you really have the /usr/lib/ library installed:

ls -l /usr/lib/x86_64-linux-gnu/
lrwxrwxrwx 1 root root 15 sep 18 14:03 /usr/lib/x86_64-linux-gnu/ ->
dpkg -S
libgl1-mesa-glx:i386: /usr/lib/i386-linux-gnu/mesa/
libgl1-mesa-glx:amd64: /usr/lib/x86_64-linux-gnu/mesa/
libgl1-mesa-glx:i386: /usr/lib/i386-linux-gnu/mesa/
libgl1-mesa-glx:amd64: /usr/lib/x86_64-linux-gnu/mesa/

(mine is 64bits that's why the difference.)

share|improve this answer
It's my fault. TI don't have the /usr/lib/ actually. How can I install that lib? – Ziu Oct 4 '13 at 3:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.