Install the libraries to /usr/lib instead of /usr/local/lib. If you’re looking for the quickest way out skip to #5. Cool.Īnyhow, there are five fixes that come to mind, and I’ll group them into “terrible ideas” and “decent ideas.” Of course, terrible and decent are my opinion, and your situation may dictate a different conclusion, so I’ll add some commentary. That confirms we’re just dealing with the new library, and not some other problem. You can see what libraries a program is dynamically linked to with the ‘ldd’ command: $ ldd /usr/local/bin/weighttp So if there’s a security problem with libev you can just patch libev, and not have to rebuild everything that uses that library. Programs that use dynamic libraries have several advantages, in that they’re smaller, and the libraries can be updated without having to recompile all the programs that depend on them. so files are essentially equal to DLLs, and load when you execute a program that depends on them. If you’re coming from a Windows background the. usr/local is a traditional place for add-on software to install itself, so it doesn’t interfere with the system libraries. …but the dynamic linker doesn’t know where they are, because it’s never heard of /usr/local/lib. 1 root root 926 Feb 22 15:20 /usr/local/lib/libev.la The problem here is that libev installed itself into /usr/local/lib: $ ls -l /usr/local/lib/libev* Do you have a suggestion?”Īh yes, a classic problem when building software. “I checked /usr/local/lib and the files are there. He asks “I’m trying to do some web performance testing and I compiled weighttp and the libev libraries, which worked fine, but when I try to run the program it gives me the following error.” weighttp: error while loading shared libraries: libev.so.4: cannot open shared object file: No such file or directory In the “I wish the Internet had an actual correct answer” category comes a question from a Windows colleague trying to build software on Linux.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |