LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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


Reply
  Search this Thread
Old 08-28-2002, 12:22 AM   #1
islandkid
Member
 
Registered: Mar 2002
Location: Victoria, BC, Canada
Distribution: None (www.linuxfromscratch.org)
Posts: 103

Rep: Reputation: 15
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?
 
Old 08-28-2002, 01:18 AM   #2
tincat2
Member
 
Registered: Feb 2002
Location: hills of WV
Distribution: slackware
Posts: 227

Rep: Reputation: 30
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.
 
Old 08-28-2002, 12:29 PM   #3
islandkid
Member
 
Registered: Mar 2002
Location: Victoria, BC, Canada
Distribution: None (www.linuxfromscratch.org)
Posts: 103

Original Poster
Rep: Reputation: 15
nope. none of that is of use to me, but thanks anyway.
 
Old 08-28-2002, 01:02 PM   #4
MartBrooks
Member
 
Registered: May 2002
Location: London
Distribution: Debian
Posts: 388

Rep: Reputation: 31
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
 
Old 08-28-2002, 03:30 PM   #5
islandkid
Member
 
Registered: Mar 2002
Location: Victoria, BC, Canada
Distribution: None (www.linuxfromscratch.org)
Posts: 103

Original Poster
Rep: Reputation: 15
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.
 
Old 08-28-2002, 03:47 PM   #6
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Only a program that has "execute" attribute can be run. Without it, it won't work. Permission 777 should do the trick.
 
Old 08-28-2002, 09:38 PM   #7
islandkid
Member
 
Registered: Mar 2002
Location: Victoria, BC, Canada
Distribution: None (www.linuxfromscratch.org)
Posts: 103

Original Poster
Rep: Reputation: 15
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.
 
Old 08-28-2002, 09:52 PM   #8
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
Try invoking it with
sh craft
 
Old 08-29-2002, 01:33 AM   #9
MartBrooks
Member
 
Registered: May 2002
Location: London
Distribution: Debian
Posts: 388

Rep: Reputation: 31
Are you sure it's even a binary?

Try running "file" on it to see.

Regards
 
Old 08-29-2002, 07:07 PM   #10
islandkid
Member
 
Registered: Mar 2002
Location: Victoria, BC, Canada
Distribution: None (www.linuxfromscratch.org)
Posts: 103

Original Poster
Rep: Reputation: 15
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#
 
Old 08-30-2002, 11:08 AM   #11
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Try to run it with the full path, if it's in /usr/local use
/usr/local/craft
 
Old 08-31-2002, 01:09 AM   #12
islandkid
Member
 
Registered: Mar 2002
Location: Victoria, BC, Canada
Distribution: None (www.linuxfromscratch.org)
Posts: 103

Original Poster
Rep: Reputation: 15
that was one of the first things I tried
 
Old 08-31-2002, 02:25 AM   #13
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Could you copy here result of ls -l?
 
Old 08-31-2002, 07:08 PM   #14
islandkid
Member
 
Registered: Mar 2002
Location: Victoria, BC, Canada
Distribution: None (www.linuxfromscratch.org)
Posts: 103

Original Poster
Rep: Reputation: 15
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
 
Old 08-31-2002, 07:10 PM   #15
islandkid
Member
 
Registered: Mar 2002
Location: Victoria, BC, Canada
Distribution: None (www.linuxfromscratch.org)
Posts: 103

Original Poster
Rep: Reputation: 15
try this file for yourself. You can download it at http://borneo.gmd.de/AS/janus/craft/index.html
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can we run the binary file directly kamesh156 Linux - General 1 10-17-2005 07:57 AM
Cannot get NVIDIA-Linux-x86_64-1.0-6629-pkg2.run to run properly doctorwebbox Linux - Hardware 0 02-06-2005 06:18 AM
can't run binary files abs Slackware 12 01-21-2005 01:56 AM
how to run any binary in background - background process tej Linux - Newbie 1 08-16-2004 12:27 AM
How to run binary at booting time hai_rajneesh Linux - Software 2 06-23-2002 03:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration