title: Porting a Unix program from one host to another
body: <p>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. :-(</p>
  
  <p>For example, I compiled <code>test</code> 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</p>
  
  <blockquote>
    <p>test: error while loading shared libraries: libgmp.so.10: cannot open shared object file: No such file or directory</p>
  </blockquote>
  
  <p>Presumably installing the compiler also installs all the dependencies - but only on the local machine. I would presumably have to somehow <em>guess</em> what dependencies I need to put on the remote machine.</p>
  
  <p>On top of that, I don't have shell access to the remote machine. I only have FTP. So I can't <em>install</em> anything. I can only copy files to it. So I'm wondering whether I can just <em>copy</em> the necessary shared libraries to the same folder as the compiled binary. Would that work? Or would I have to do something more complex?</p>