Depends.exe for GNU / Linux

I need to distribute the binary for GNU / Linux ...

On Windows, I can run a utility called "depend.exe" that will check all the dependencies that the file has, so I might know what to send with the file, as I do the same with GNU / Linux

Clarification: I did not mean LITERALLY distributing it (unless it is some kind of specific library that never creates problems, for example ... libThatOnlyMySoftwareUseVersion0.00042895.08421thatnoonehas It seems that users will need ...)

+4
source share
3 answers

The utility you are looking for in Linux is called ldd . However, your users use the service and do not think about distributing libraries with your program. Ask your users to set the necessary conditions through the appropriate channels. Or, even better, package your software using an appropriate installation system such as RPM, apt or portage (I assume you cannot use the source distribution and autotools); this allows the package management system to automatically resolve dependencies by pulling out any necessary libraries.

Distributing versions of libraries using ad-hoc schemes will only lead to problems for end users (something similar to the DLL add-on in Windows). They may run into conflicts, crashes, and possibly security holes.

You can use ldd to find out which libraries your binary depends on so that you can configure the correct dependencies when creating packages (some packages, like RPM, actually do this for you).

+9
source

On linux you can try ldd.

+1
source

Typically, you should build a linux binary for a particular Linux distribution and simply provide your own binary and require users to install other parts. If you use a system that uses rpm packages, you want to read how to create RPMs, if you use the Debian version, then you want to see how apt binary packages are created.

If you want to manually check which libraries your binary is linking to:

  ldd /whereever/is/your/binary 

will provide you with a list of linked libraries for dynamically linked binaries. but you DO NOT want to distribute most of them, since it is trying to redistribute system32.dll or windows.dll as a bad bad idea: ^)

+1
source

All Articles