title: 32-bit nasm assembly not starting on 64 bit system
body: <p>I have written a 32-bit assembly file and I want to compile it ( and have it working) on a 64-bit Linux system. I have installed <code>gcc-multilib</code> and <code>lib32-glibc</code>.</p>
  
  <p>I try to create the binary with the following commands:</p>
  
  <pre><code>nasm -f elf test.asm
  ld -melf_i386 -o test -e _main test.o /usr/lib32/libc.so.6 
  </code></pre>
  
  <p>where <code>_main</code> is the entry point. The file test is created, and I chmod it:</p>
  
  <pre><code>chmod ugo+x ./test
  </code></pre>
  
  <p>Howevery, I am unable to open it. I get:</p>
  
  <pre><code>bash: ./test: No such file or directory
  </code></pre>
  
  <p>I am certain the file exists, because I can open it in vim (and I can see ELF written on the first line). What's going on here?</p>