Bash says file does not exist, but it does

Solution 1:

You mentioned that the output of file mkdep is 32-bit elf. You're running a 64-bit VM.

Example:

$ uname -m
x86_64
$ ls -l ./example 
-rwxr-xr-x 1 root root 92312 2011-08-18 16:52 ./example
$ file ./example 
example: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, stripped
$ ./example 
-bash: ./example: No such file or directory

Just make a new 32-bit VM and compile it there.

Solution 2:

Is it set to being executable? If not, then chmod +x filename. Is it in your PATH? If not, then call it as ./filename rather than just filename.