You have just installed the new program foobar manually. This program uses shared libraries, which are installed to /usr/local/foobar/lib. What is necessary to do after the installation so that the libraries can be used?
restart your computer
run ldconfig
edit /etc/ld.so.conf to add the new library path and then run ldconfig
edit /etc/ld.so.conf to add the new library path and then run ld.so