I've got different versions of the Libnet library installed in different locations on the same system:whereis libnetlibnet: /usr/lib/libnet.la /usr/lib/libnet.a /usr/lib/libnet.so /usr/local/lib/libnet.la /usr/local/lib/libnet.a /usr/local/lib/libnet.so /usr/include/libnet.h /usr/include/libnet /usr/man/man3/libnet.3I have some problems with compiling a program that depends on these libnet libraries so I want to remove the usr/local/....-ones. Can you tell me how to do that, i.e, when I whereis libnet on the command line I want to not see the /usr/local/... references ?!Thank you!
Change library location
linux
I have some problems with compiling a program that depends on these libnet libraries so I want to remove the /usr/local/-onesIt is generally not necessary to remove the library located in /usr/local. So don't get fooled by whereis. You can specify library paths where libraries should be searched first by means of the  LD_LIBRARY_PATH environment variable.In your case, you have to add /usr/lib to LD_LIBRARY_PATH and append the variable to the environment of your make process. This is usually done by$ export LD_LIBRARY_PATH=/usr/libbefore starting the make process or by prefixing the related command with the parameter assignment. Usually that looks like$ LD_LIBRARY_PATH=/usr/lib ./configureIf you really want to get rid of the library under /usr/local you first have to clarify a question.How did you install the library (since it's under /usr/local it's likely that you did it):with your package managerby means of make installjust moved the binary to the directory