Pregunta

I'm trying run a program(Snort) that uses libdnet but it fails to find it and outputs:

snort: error while loading shared libraries: libdnet.1: cannot open shared object file: No such file or directory

Now I know that I should add the library by running ldconfig and putting path to the library in /etc/ld.so.conf. libdnet is located in /usr/local/lib so I don't have to modify ld.so.conf since it already covers that dirctory. So I ran the following commands and tracing the output, I noticed my library is not being loaded.

ldconfig -v

Apparently ldconfig only loads files that have .so somewhere in their names and libdnet.1 doesn't match the pattern.
I've built libdnet from source and installed it using ./configure; make; make install commands. I'd rather not install it using the package manager unless I have to. What should I do?

EDIT:
It says here that libraries should match the patter lib*.so* but I can't rename the library. I neither made it nor am I using it in my own app: if I rename it it will be loaded but I think Snort is looking for libdnet.1 not libdnet.so.1.

¿Fue útil?

Solución

Found the answer here. The Solution was simple: make a copy that matches the pattern.

cp /usr/local/lib/libdnet.1.0.1 /usr/local/lib/libdnet.so.1.0.1

A less preferred alternative:

$ LD_LIBRARY_PATH=/usr/local/lib
$ export LD_LIBRARY_PATH
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top