Linux - General This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
|
08-28-2002, 12:22 AM
|
#1
|
Member
Registered: Mar 2002
Location: Victoria, BC, Canada
Distribution: None (www.linuxfromscratch.org)
Posts: 103
Rep:
|
Why won't this binary run?
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?
|
|
|
08-28-2002, 01:18 AM
|
#2
|
Member
Registered: Feb 2002
Location: hills of WV
Distribution: slackware
Posts: 227
Rep:
|
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.
|
|
|
08-28-2002, 12:29 PM
|
#3
|
Member
Registered: Mar 2002
Location: Victoria, BC, Canada
Distribution: None (www.linuxfromscratch.org)
Posts: 103
Original Poster
Rep:
|
nope. none of that is of use to me, but thanks anyway.
|
|
|
08-28-2002, 01:02 PM
|
#4
|
Member
Registered: May 2002
Location: London
Distribution: Debian
Posts: 388
Rep:
|
Two reason why you might get this error:
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.
Regards
Regards
|
|
|
08-28-2002, 03:30 PM
|
#5
|
Member
Registered: Mar 2002
Location: Victoria, BC, Canada
Distribution: None (www.linuxfromscratch.org)
Posts: 103
Original Poster
Rep:
|
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.
|
|
|
08-28-2002, 03:47 PM
|
#6
|
Moderator
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696
|
Only a program that has "execute" attribute can be run. Without it, it won't work. Permission 777 should do the trick.
|
|
|
08-28-2002, 09:38 PM
|
#7
|
Member
Registered: Mar 2002
Location: Victoria, BC, Canada
Distribution: None (www.linuxfromscratch.org)
Posts: 103
Original Poster
Rep:
|
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.
|
|
|
08-28-2002, 09:52 PM
|
#8
|
LQ Addict
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704
Rep:
|
Try invoking it with
sh craft
|
|
|
08-29-2002, 01:33 AM
|
#9
|
Member
Registered: May 2002
Location: London
Distribution: Debian
Posts: 388
Rep:
|
Are you sure it's even a binary?
Try running "file" on it to see.
Regards
|
|
|
08-29-2002, 07:07 PM
|
#10
|
Member
Registered: Mar 2002
Location: Victoria, BC, Canada
Distribution: None (www.linuxfromscratch.org)
Posts: 103
Original Poster
Rep:
|
bash-2.05a# file craft
craft: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
bash-2.05a# ./craft
bash: ./craft: No such file or directory
bash-2.05a#
|
|
|
08-30-2002, 11:08 AM
|
#11
|
Moderator
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696
|
Try to run it with the full path, if it's in /usr/local use
/usr/local/craft
|
|
|
08-31-2002, 01:09 AM
|
#12
|
Member
Registered: Mar 2002
Location: Victoria, BC, Canada
Distribution: None (www.linuxfromscratch.org)
Posts: 103
Original Poster
Rep:
|
that was one of the first things I tried
|
|
|
08-31-2002, 02:25 AM
|
#13
|
Moderator
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696
|
Could you copy here result of ls -l?
|
|
|
08-31-2002, 07:08 PM
|
#14
|
Member
Registered: Mar 2002
Location: Victoria, BC, Canada
Distribution: None (www.linuxfromscratch.org)
Posts: 103
Original Poster
Rep:
|
bash-2.05a# ls -l
total 14088
drwxr-sr-x 2 959 391 4096 Feb 21 1997 buttons
-rwxrwxrwx 1 959 391 11328394 Jun 10 1997 craft
-rw-r--r-- 1 Aaron users 3008211 Aug 31 17:07 craft_l35.tar.Z
drwxr-sr-x 3 959 391 53248 Feb 21 1997 hcraft
drwxr-sr-x 3 959 391 4096 Feb 21 1997 html
|
|
|
08-31-2002, 07:10 PM
|
#15
|
Member
Registered: Mar 2002
Location: Victoria, BC, Canada
Distribution: None (www.linuxfromscratch.org)
Posts: 103
Original Poster
Rep:
|
try this file for yourself. You can download it at http://borneo.gmd.de/AS/janus/craft/index.html
|
|
|
All times are GMT -5. The time now is 04:52 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|