Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
One one computer i have an executable, let's say it's named "crazy" since that's how it's acting. When i go into the directory where it is and type "./crazy" i get "No such file or directory". It has executable permissions, proper ownership, as does the directory it's in. If i try the ldd command on it, that too says there's no such file. it won't run in a debugger, even.
On another machine, the same file exists in the same place and it runs fine. Same size file, same permissions, etc., nothing at all different.
Somewhere, something is different between these two machines. Anyone have any idea where to look, what it's likely to be?
It sounds crazy! How did you determine it has proper ownership and permissions? Is the ls command able to see it?
permission is -rwxr-xr-x which means anyone should be able to run it. ls sees it fine, as does any command that deals with files other than executing them.
permission is -rwxr-xr-x which means anyone should be able to run it. ls sees it fine, as does any command that deals with files other than executing them.
Is there any special attribute assigned to this file?
permission is -rwxr-xr-x which means anyone should be able to run it. ls sees it fine, as does any command that deals with files other than executing them.
So why is this command so secret? Without any other information and the information provided, I agree, you should be able to run this command. I can't go beyond that without knowing any more details of this file, program, where it's located, exact full permissions... blah blah blah.. and so on..
If you have a binary that fails to run with: No such file or directory, it generally means that the file cannot even be loaded, which usually means that the dynamic linker can't be found. ldd actually executes the file in order to list the libraries it uses, so if even ldd doesn't work, this is often the problem.
Try something like
hexdump -C ./crazy | grep -A5 /lib
to pull out whatever dynamic linker it was linked against. Ordinarily, it will be /lib/ld-linux.so.2 but perhaps it's an old binary or it's not linked against glibc (uclibc maybe?).
(hexdump, of course is just to prevent random binary characters being printed to the screen).
If that doesn't find it, try
hexdump -C ./crazy | head -n 50
the linker should be near the start of the file, so this should show it up.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.