I need to distribute a binary file for GNU/Linux...
On Windows, I could run a utility named "depends.exe" that would verify all dependencies that the file have, thus I would be able to know what to ship with the file, how I do the same with GNU/Linux?
Clarification: I did not mean LITERALLY distributing it (unless it is some certain library that never generate problems, like... libThatOnlyMySoftwareUseVersion0.00042895.08421thatnoonehas Kinda like figuring that the users would need...)
The utility you are looking for on Linux is called ldd
. However, do your users a favor and don't think about distributing libraries with your program. Require your users to install the prerequisites through the proper channels. Or, better yet, package your software using an appropriate installation system like RPM, apt, or portage (I'm assuming you can't use source distribution and the autotools); doing so allows the package management system to automatically resolve dependencies by pulling in any required libraries.
Distributing versions of libraries using ad-hoc schemes is going to only cause problems for end users (something akin to DLL hell on Windows). They can end up with conflicts, crashes, and possibly security holes.
You can use ldd
to figure out what libraries your binary depends on so that you can set up the proper dependencies when you make your packages (some packagers, like RPM, actually do this for you).
On linux you can try ldd.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With