Copying a compiled binary package to another Linux machine of whatever ancient distribution, and being able to run it, is more or less a dream than a reality. Hence why tools like Docker are so useful. But I don’t think I would feel natural to use Docker to run, say, vim with YouCompleteMe built with a certain set of options.
So the solution usually boils down to copying all dependencies along with whatever package I am going to use. But dependencies have dependencies too, so the right answer would be “all recursive dependencies”. Which is still often doable with the help of tools like ldd
. But some libraries are more angry than others; a particularly one, glibc
, does not simply work if one copies it to another machine and expect the dynamic loader to load it. Of course, one can also copy the dynamic loader, ld.so
, but that puts many extra limitations on what you can run and what it can interact with.