Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
I downloaded a program and I can't invoke the main executable. When I try to run it like this: ./craft I get the error: bash: ./craft: No such file or directory , but it is certainly there. I can view its contents by using vi like: vi craft , but when I go to run it bash can't find it anymore. What gives? I have full permissions to run it. What could be the reason for a binary like this one becoming undetectable by bash?
don't know for sure about your situation, but you're going to have to run the executable from the directory wherein it is installed or have it's location in your PATH-others know more about this than me, i'm just passing on what i have observed in my own setup. another thing, if this binary runs under a particular environment, that will have to be activated first though bash would probably note that unless installation has'nt been such to indicate that(something like java runtime environment). don't know that this will be of use to you, but keep at it and good luck.
1) "./", the current directory, is not in your path. Try "./filename".
2) You also need to make sure the file has its executable bit set, see 'man chmod' to see how to do this.
well it's definately not the first one. I've tried running it in the path, running it with ./filename, changing permissions and everything else I could think of. I'll try your second suggestion. It seems quite likely. The thing I don't get is that I can open it with an editor, I can copy it, I can do a number of operations on it, but when I try to execute it, bash says it isn't there.
yes, I know. chmod 777 was the first thing I did to it. And it is an executable, but if it wasn't bash would still try to run it if it had executable permissions. I tried all the obvious stuff right away.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.