I have a remote Unix server that I want to run various programs on. I can easily set up a local virtual machine running some flavour of Unix, on which I can compile my programs. The trouble is, it seems that moving a Unix program from one host to another always fails spectacularly. :-(
For example, I compiled test
on an OpenSUSE 11.4 system, and tried to run it. It worked perfectly. But then I copied the compiled binary to a Debian 6.0.3 system, and now it refuses to run. Instead, I just get
test: error while loading shared libraries: libgmp.so.10: cannot open shared object file: No such file or directory
Presumably installing the compiler also installs all the dependencies - but only on the local machine. I would presumably have to somehow guess what dependencies I need to put on the remote machine.
On top of that, I don't have shell access to the remote machine. I only have FTP. So I can't install anything. I can only copy files to it. So I'm wondering whether I can just copy the necessary shared libraries to the same folder as the compiled binary. Would that work? Or would I have to do something more complex?