On Thu, 1 May 1997, Jesse Goldman wrote:

> I'm having a strange problem with some machines here. Both are pentiums
> running debian which have the same versions of all software on them. The
> kernel version is 2.0.30. Within the last couple hours, something's
> happened to cause them to have trouble executing binaries. One was an
> executable I compiled, the other was doom (even more important). The
> message I get after executing is:
> 
> [executable]: Exec format error. Binary file not executable.
> 
> And yet running "file" on it gives:
> 
> [executable]: Linux/i386 demand-paged executable (ZMAGIC), stripped
> 
> which should be fine. (This same program works on another Linux machine I
> have)  I thought it might be a problem with binutils or libbfd but
> reinstalling them didn't help. For some reason, recompiling the first
> application seemed to fix the problem but with doom, I'm stuck (and with
> any other executable I download). Any ideas why this is happening?

You haven't recompiled your kernel, or moved your modules around, or
something? The problem appears to be that your files are a.out, rather
than ELF like most binaries, which is what ZMAGIC (and QMAGIC, I'm not
sure on the difference) means. It looks like your system may not be able
to find the code to run code in a.out format any more. I tried this on my
system (using one of the four a.out executables I have left! I'm afraid I
couldn't find a ZMAGIC at all ...), by renaning the module file and
trying to run it. As you can see, I got roughly the same error:
---
[EMAIL PROTECTED]:~$ file `which bible`
/usr/local/bin/bible: Linux/i386 demand-paged executable (QMAGIC), stripped
[EMAIL PROTECTED]:~$ sudo mv /lib/modules/2.0.29/fs/binfmt_aout.{o,tmp}
[EMAIL PROTECTED]:~$ bible
bash: /usr/local/bin/bible: cannot execute binary file
[Exit 126]
[EMAIL PROTECTED]:~$ sudo mv /lib/modules/2.0.29/fs/binfmt_aout.{tmp,o}
[EMAIL PROTECTED]:~$ bible
bible: BRS Release 4.00, $Date: 93/04/26 11:18:28 $
Hit '?' for help.

Genesis 1

  1 In the beginning God created the heaven and the earth.
bible(KJV) [Gen1:1]> q
[EMAIL PROTECTED]:~$
---

The fix is to recompile your kernel, and include support for a.out
binaries either as a module or in the kernel. If you just want it as a
module (which I'd recommend), you probably only need to make the modules.

I have no idea why it compiled as a.out for you, though ...

HTH,

&E

-- 
Andy Mortimer, [EMAIL PROTECTED]
http://www.netforward.com/poboxes/?andy.mortimer
Finger [EMAIL PROTECTED] for PGP public key
--
Give me life, give me pain,
Give me myself again.


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .

Reply via email to