Thursday, 7 July 2011

When I try to run the program foo I get "error while loading shared libraries:"

check the libraries the program foo uses with :
$ ldd foo

check if is in the output of:
$ ldconfig -v

(1) Add directories with your libraries into /etc/ (recommended method):
$ cat /etc/
include /etc/*.conf

(2) Ubuntu generally looks for library in /usr/lib and /usr/local/lib so add your libraries in these directories (not recommended method)

$ man ldconfig
$ man ldd

No comments:

Post a Comment