Linux “No such file or directory” When Running a Program

When you attempt to run a file (not a dead link) that exists in a directory and is executable to everyone, you get an error complaining it can’t run the file because of “No such file or directory”. Can this happen? Yes, it happened once to me a few while ago and again today.

It turned out I was trying to run a 32bit program on my 64bit Ubuntu. This can be easily found out by the file command. For example, if the runnable’s name is runme, then you can check the file details by

file runme

It will print out something like

ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped

Advertisements
This entry was posted in Linux and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s