Which of these commands allows you to use shared libraries that are in /usr/local/lib?

Which of these commands allows you to use shared libraries that are in /usr/local/lib?

Which of these commands allows you to use shared libraries that are in /usr/local/lib?

A.
export LD_PRELOAD=/usr/local/lib

B.
export LD_LIBRARY_PATH=/usr/local/lib

C.
ldconfig /usr/local/lib

D.
ldd /usr/local/lib

Explanation/Reference:
ld.so searches for shared libraries in LD_LIBRARY_PATH before looking in the standard directories.
alternatively you can specify the directory in the /etc/ld.so.conf and running ldconfig.



Leave a Reply 1

Your email address will not be published. Required fields are marked *


Ronnie

Ronnie

Both B and C are correct. Answer B is a temporary solution. Answer C is a more permanent solution.