Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!occrsh!occrsh.ATT.COM!rjd From: rjd@occrsh.ATT.COM Newsgroups: comp.sys.att Subject: Re: Problem with a.out's Message-ID: <144800013@occrsh.ATT.COM> Date: 18 Jan 88 14:29:00 GMT References: <1181@cooper.cooper.EDU> Lines: 34 Nf-ID: #R:cooper.cooper.EDU:-118100:occrsh.ATT.COM:144800013:000:1647 Nf-From: occrsh.ATT.COM!rjd Jan 18 08:29:00 1988 >The 3b2/200 I was using was recently upgraded (new UNIX, additional No such machine.... 3B2/300? > [ deleted details of repair ] >So here is my problem: When I try to execute a.out, I get the message >'a.out: Cannot execute'. I used the -V flag to check compilation, >assembly, and linkage and they are completed without error (or so it >seems to me). The file attributes for a.out indicates that a.out >can be executed (-rwxr-xr-x) but the system tells me it can't be. >However, bin files can be executed when they are -rwxr-xr-x-. >I can't find anything in the manuals so far to tell me why I'm >having problems. Is it because some software or hardware was >improperly installed or replaced? Check your path... You are trying to run an a.out found in your path before the one in the present directory. If unsure, execute "type a.out" and the shell (at least the stock Bourne /bin/sh and the Korne shell) will tell you what a.out it is executing. My bet is that there is an a.out in your path before the one that you are trying to execute that happens to be non-executable. I know of no possible hardware failure that could cause the message without causing umpteen million other weird failures. To fix: either just execute "./a.out" to execute the one in the present path, change your PATH variable, remove the non-executable a.out, move your a.out file to a different name, or compile the program you want into another file using the -o option. Randy BTW: a binary executable file only needs the execute bit set to execute, so all you need for the owner to run it is ---x------, a shell script needs the read bit set also.