New answers tagged executable
I found the solution in the comments of this question : When executable files aren't It was a 32 / 64 bit problem. When executable files aren't fixed it.
This is binfmt_misc in action: it allows the kernel to be told how to run binaries it doesn't know about. Look at the contents of /proc/sys/fs/binfmt_misc; among the files you see there, one should explain how to run Mono binaries: enabled interpreter /usr/lib/binfmt-support/run-detectors flags: offset 0 magic 4d5a (on a Debian system). This tells the ...
/usr/bin : contains executable programs that are part of the operating system and installed by its package manager /usr/local/bin : default location for executable programs not part of the operating system and installed there by the local administrator, usually after building them from source with the sequence configure;make;make install. The goal is not to ...
/usr/bin is general system-wide binaries that contains most of the executable files (i.e., ready-to-run programs) that are not needed for booting (i.e., starting) or repairing the system. /usr/local/bin is for programs that a normal user may run.
To get a list of all the files installed by a package, you can use dpkg -L <package_name> In your case dpkg -L nginx-light will list all the files installed by the package. Look at that list to know where the executable has been installed. Also, if you know the executable's name beforehand, you can filter the list of files with grep: dpkg -L ...
The libraries on the target system differ from those of the host system your executable was compiled on / against. You should include --static option in your CFLAGS and LDGLAGS if you're using make. If you're using straight gcc, use the --static option this way the executable is portable.
Bash (and in fact all shells) will execute the first executable file found of the name given searching in the order defined by the $PATH in the environment. Or simply: The first executable found in the $PATH order.
Your $PATH is searched sequentially. For example if echo $PATH shows /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin, each of those directories is searched in sequence for a given command (assuming the command isn't an alias or a shell builtin). If you want to override specific binaries on a per-user basis (or you just don't have access to ...
Top 50 recent answers are included