EC2 Ubuntu 12.10 x64 - No such file or directory

Published 1 min read
Image Credit: Unknown (if this is your work, reach out to me and I'll credit you!)

Hi folks,

Took me a minute to work out how to do this, so here's my guide on it. The error message I was getting was "-bash: No such file or directory" when I tried to run a dynamically linked ELF executable (standard binary). Also, interestingly enough when I tried to "ldd" the executables, it was telling me that they were not dynamically linked, which I knew for a fact they were!

Really simply, Ubuntu 12.10 (Quantal Quetzal) x86_64 on Amazon EC2 doesn't come with any foreign architectures pre-installed.

To change this, it's a simple process of telling dpkg that it should also be looking for i386 as well as amd64 packages. The command is as follows:

sudo dpkg --add-architecture i386 && sudo apt-get update && sudo apt-get install ia32-libs

Bear in mind this guide is specific to Ubuntu 12.10. 12.04's dpkg won't understand --add-architecture. That notwithstanding, you should now happily be able to run x86 binaries on your x86_64 system without so much as a single reboot!


All content © Alex Shepherd 2008- unless otherwise noted