title: How to solve "error while loading shared libraries" when trying to run an arm binary with qemu-arm?
body: <p>I'm running Linux Mint 14 with qemu, qemu-user, and the gnueabi toolchain installed. I compiled test.c with <code>arm-linux-gnueabi-gcc test.c -o test</code>.</p>
  
  <p>When I try and run <code>qemu-arm /usr/arm-linux-gnueabi/lib/ld-linux.so.3 test</code></p>
  
  <p>I get an error saying: <code>test: error while loading shared libraries: test: cannot open shared object file: No such file or directory</code>. Running <code>qemu-arm test</code>, as I've previously tried, gives <code>/lib/ld-linux.so.3: No such file or directory</code></p>
  
  <p>However, the file does exist and is reachable.</p>
  
  <pre><code>$ stat /usr/arm-linux-gnueabi/lib/ld-linux.so.3
    File: `/usr/arm-linux-gnueabi/lib/ld-linux.so.3' -&gt; `ld-2.15.so'
    Size: 10          Blocks: 0          IO Block: 4096   symbolic link
  Device: 801h/2049d  Inode: 4083308     Links: 1
  Access: (0777/lrwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)
  Access: 2013-04-22 16:19:48.090613901 -0700
  Modify: 2012-09-21 08:31:29.000000000 -0700
  Change: 2013-04-22 15:58:41.042542851 -0700
   Birth: -
  </code></pre>
  
  <p>Does anyone know how I can make qemu run an arm program without having to emulate an entire arm Linux kernel?</p>
  
  <p>test.c is</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  int main() {
      printf("this had better work\n");
  }
  </code></pre>
  
  <p>and <code>file test</code> is</p>
  
  <pre><code>test: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.31, BuildID[sha1]=0xf2e49db65394b77c77ee5b65b83c0cc9220cbfc0, not stripped
  </code></pre>