问题
I am trying to purge the ldconfig cache of links to libraries to link against. I have a local folder where newly built libraries are placed. I want to update the ldconfig cache to point to these newly built libs.
I have tried using the ldconfig -c command, giving it my own .conf file. I also tried replacing the /etc/ld.so.conf file to point to the new path of libs. But even after doing this, when I check the cache using the ldconfig -p command , it is still showing the old libs.
Hence how to purge and rebuild the ldconfig cache? Just to add : I am on Ubuntu 13.10.
回答1:
2 years late, but in case someone stumble upon this, as su, run the following commands:
rm /etc/ld.so.cache
ldconfig
回答2:
Rebuild cache
Open the /etc/ld.so.conf as sudo and add a new line with the library directory. In this case, we add /usr/local/lib.
Rerun ldconfig to rebuild the cache:
$ sudo ldconfig
This worked for me.
回答3:
I solved the problem by doing the following:
$ > /etc/ld.so.cache
then:
$ ldconfig
来源:https://stackoverflow.com/questions/21758828/purging-and-rebuilding-ldconfig-cache