[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: error message lacks useful debugging information
From: |
Greg Wooledge |
Subject: |
Re: error message lacks useful debugging information |
Date: |
Wed, 4 Oct 2023 23:13:52 -0400 |
On Wed, Oct 04, 2023 at 08:05:41PM -0400, Dave Cigna via Bug reports for the
GNU Bourne Again SHell wrote:
> Attempting to tun an executable file (not a bash script) with the following
> command:
>
> ./Candle
>
> the following error message is reported by bash:
>
> bash: ./Candle: cannot execute: required file not found
>
> The executable file 'Candle' does exist in the current directory;
> if it didn't then bash would report a different error.
Ironically, this *is* the improved error message, which is supposed to
be less confusing than the previous message ("No such file or directory").
You're right that bash does not tell you which file is missing. But
that's because bash doesn't know, either. All bash knows is that it
asked the kernel to execute this command, and the kernel said
"No such file or directory" (ENOENT), but the command you asked to
run exists as a file. Therefore, bash gives this message, instead of
"No such file or directory".
Since you claim it's not a script, your next steps would be to run "file"
against it, and if "file" claims it's a compiled executable, try running
"ldd" against it. You're probably missing whatever loader is required
to run this program. Loaders are programs like /lib/ld-linux.so which
should be visible in ldd's output, and often in file's output as well.
The inability to execute a compiled program usually means it was
compiled for a different platform/architecture than your system uses.
For example, you might be trying to run an i386 (32-bit Intel) compiled
program on an amd64 (64-bit AMD/Intel) system, without the correct i386
compatibility libraries installed. Or you might be trying to run
something completely foreign, like an ARM program on an x86 computer.
> download: candle_1.1.7.tar.gz
> from: https://github.com/Denvi/Candle
Unfortunately, this web site does not say *what* kind of Linux system
that program was built for.
You'll have to use "file" and/or "ldd" to diagnose it. Or ask the
maintainers, or whatever support channels are available.
Re: error message lacks useful debugging information, Ángel, 2023/10/05