This question already has an answer here:

I’m not able to execute the files in a mounted directory in my Ubuntu 16.04 VM. I get the error “command not found”:

dseltz-VirtualBox:/local> ls -al /nfs/local/gnu/i86Linux2.0/bin/makeheader

-rwxr-xr-x 1 systemd-network uucp 49379 Oct 20 1999 /nfs/local/gnu/i86Linux2.0/bin/makeheader

dseltz-VirtualBox:/local> /nfs/local/gnu/i86Linux2.0/bin/makeheader /nfs/local/gnu/i86Linux2.0/bin/makeheader: Command not found.

My VM is a x64 running Ubuntu 16.04 and so is the mounted system.

I looked at the mounts and don’t see the noexec property(on either system).

Here is the mount command:

sudo mount -o exec /nfs/local

I made sure my users matched on my VM machine and the build system.

Any ideas what I'm doing wrong?

marked as duplicate by Gilles, Kusalananda, countermode, Jeff Schaller, mdpc Feb 3 '17 at 0:17

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    It looks like you mounted at /nfs/local but are trying to run a file that is in absolute path /local – steeldriver Feb 2 '17 at 13:49
  • What is the output of file /local/gnu/i86Linux2.0/bin/makeheader ? – Satō Katsura Feb 2 '17 at 13:59
  • I have a logical link from /nfs/local to /local: sudo ln -s /nfs/local / From either location the error is "Command not found" – David Seltz Feb 2 '17 at 15:04
  • dseltz-VirtualBox:/local> file /nfs/local/gnu/i86Linux2.0/bin/makeheader /nfs/local/gnu/i86Linux2.0/bin/makeheader: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, not stripped – David Seltz Feb 2 '17 at 15:07
  • Could this be a 32bit vs. 64bit issue? – David Seltz Feb 2 '17 at 15:09

With the help of the comment from Kusalananda I found that I needed to add i386 architecture to run my 32-bit packages:

sudo dpkg --add-architecture i386
sudo apt-get update
apt-get install libc6:i386
apt-get install libgtk2.0-0:i386
  • your can do the install in one: apt-get install libc6:i386 libgtk2.0-0:i386 – ctrl-alt-delor Feb 2 '17 at 23:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.