Monday, April 29, 2024
15
rated 0 times [  15] [ 0]  / answers: 1 / hits: 40519  / 1 Year ago, sat, march 4, 2023, 7:52:17

Why would bash claim that a file doesn't exist when it clearly does?



$ ls -l a
-r-x------ 1 configurator configurator 3904 Dec 7 10:36 a

$ file a
a: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, stripped

$ ./a
-bash: ./a: No such file or directory

More From » command-line

 Answers
2

You get this error because you try to run a 32-bit executable on a 64-bit operating system.



And the message No such file or directory does not refer to your executable file called a. Instead the error it refers to a helper program that's needed to run the 32-bit dynamically linked executable a.



You can find more information referring to static and dynamic linkage in this answer.


[#28062] Sunday, March 5, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ickump

Total Points: 234
Total Questions: 124
Total Answers: 111

Location: Jordan
Member since Fri, Apr 8, 2022
2 Years ago
ickump questions
Mon, Aug 16, 21, 08:46, 3 Years ago
Mon, Aug 22, 22, 02:44, 2 Years ago
Sun, Oct 2, 22, 07:13, 2 Years ago
;