No such file or directory when running a binary

  • Done
  • quality assurance status badge
Details
3 participants
  • Bengt Richter
  • Maxime Devos
  • Haider Mirza
Owner
unassigned
Submitted by
Haider Mirza
Severity
normal

Debbugs page

Haider Mirza wrote 3 years ago
(address . bug-guix@gnu.org)
87h76v1xs4.fsf@gmail.com
I am trying to run a binary and it returns
"bash: ./silent-syphon: No such file or directory"

This issue does not seem to happen on other distros (tested on
Archlinux) and has been reproduced on several GNU Guix
installations.
This error has occured before and every both times the binary was
originally found in a zip file.
I unzip the file with "unzip foo". Using the unzip program.

Easiest way to reproduce this by unzipping the binary in this
Github repo:

The internet suggests that this might be because I am running a
32-bit program on a 64-bit system.
LDD shows the binary to be fine and error continued to happen even
after installing all dependancies/libraries.
I am on the Guix Operating system with everything being
up-to-date.

Can you suggest any sort of fix?
Attachment: file
--
Haider Mirza via Emacs on a GNU/Linux system
Maxime Devos wrote 3 years ago
76dcf44e10f068001079b065518ba8866f149ed3.camel@telenet.be
Haider Mirza schreef op do 14-04-2022 om 16:34 [+0100]:
Toggle quote (8 lines)
> I am trying to run a binary and it returns "bash: ./silent-syphon: No
> such file or directory"
> This issue does not seem to happen on other distros (tested on
> Archlinux) and has been reproduced on several GNU Guix installations.
> This error has occured before and every both times the binary was
> originally found in a zip file. I unzip the file with "unzip foo".
> Using the unzip program.

It probably uses /lib64/ld-linux-x86-64.so.2 or the like which does not
exist on Guix.  What is the interpreter according to "readelf -l
silent-python"? (look for ‘Requesting program interpreter: ’ in the
output). What does 'stat THE-INTERPRETER’ say?

Toggle quote (3 lines)
> LDD shows the binary to be fine and error continued to happen even
> after installing all dependancies/libraries.

'ldd' is not perfect. As an additional test, could be to do "strace
./silent-python", maybe it tells you which file could not be found.

Greetings,
Maxime
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYlrDxBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7u/eAQDQ0lg4l/Cv85lEVk3Tv9wC0zAs
RIsIaG81bqv4/kWb7wEAtlM9mgWv+KHKTeYDCTkDCLhKY4uthuvZeV+ehzzhOAQ=
=Mwu6
-----END PGP SIGNATURE-----


Maxime Devos wrote 3 years ago
2baf3596a45611a7c10b64a698fb7ad4b09c4d95.camel@telenet.be
Haider Mirza schreef op do 14-04-2022 om 16:34 [+0100]:
Toggle quote (4 lines)
> Easiest way to reproduce this by unzipping the binary in this Github
> repo:
> https://github.com/FluxHarmonic/ld50-silent-syphon/releases/tag/dev

I'm not running random binaries. Anyway, AFAICT, this is not (yet?)
free software, so I'm considering to close this?

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYlrFfBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7j2aAP4tOIo0zPPnxPWp0mjzUKK5zOTa
IaGMjxSm3VfQ4jgw7wEA9X+zdueGUv7orvgT2r0M5pGb9W9aZQAT+/Vfa2iCvww=
=Z/xU
-----END PGP SIGNATURE-----


Maxime Devos wrote 3 years ago
e8f557075f49fe0ec5278468ec17a4df5c7fd4e9.camel@telenet.be
Haider Mirza schreef op za 16-04-2022 om 14:58 [+0100]:
Toggle quote (4 lines)
> You're right about the fact that the binary is requesting "/lib64/ld-
> linux-x86-64.so.2" Is it possible to force the binary to use another
> interpreter? If not you can close this down.

Yes, here's how to do it on Debian:

$ ~/.guix-profile/lib/ld-linux-x86-64.so.2 /bin/ls
/bin/ls: error while loading shared libraries: libselinux.so.1: cannot
open shared object file: No such file or directory
[failed!]

Though as can be seen above, not all combinations of interpreters and
binaries actually function ...

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYlrPphccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7tKSAP4m31dpMb+rij2C0z8E28ul1ov1
DGIb37B26USD4FP+3QD9HUGDXM4qVnLs9HAga41JyV7LfVOJQN/Btbl6d3DZOgs=
=3D+Z
-----END PGP SIGNATURE-----


Closed
Haider Mirza wrote 3 years ago
87sfqd9l9w.fsf@gmail.com
You're right about the fact that the binary is requesting
"/lib64/ld-linux-x86-64.so.2"
Is it possible to force the binary to use another interpreter?
If not you can close this down.

Greetings,
Haider.
Attachment: file
Haider Mirza wrote 3 years ago
87o8119ke6.fsf@gmail.com
Nevermind, I found the command "patchelf --set-interpreter
/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/ld-linux-x86-64.so.2
clangd" to work just fine

Thank you for your help!

Best of luck,
Haider.
Attachment: file
Bengt Richter wrote 3 years ago
(name . Maxime Devos)(address . maximedevos@telenet.be)
20220416233249.GA2485@LionPure
Hi Maxime & Haider,

(This is not to accuse you Haider, who I don't know, of probing Maxime
-- but consider the seemingly casual example you are setting for noobs
in suggesting running an unknown (to others) binary).

On +2022-04-16 15:32:44 +0200, Maxime Devos wrote:
Toggle quote (11 lines)
> Haider Mirza schreef op do 14-04-2022 om 16:34 [+0100]:
> > Easiest way to reproduce this by unzipping the binary in this Github
> > repo:
> > https://github.com/FluxHarmonic/ld50-silent-syphon/releases/tag/dev
>
> I'm not running random binaries. Anyway, AFAICT, this is not (yet?)
> free software, so I'm considering to close this?
>
> Greetings,
> Maxime.

In [0]:
Toggle snippet (7 lines)
The con starts off as many that target individuals do
nowadays: With a text message. In this case it's not a
phishing attempt, it's an attempt to ascertain whether the
person receiving the message is susceptible to further
manipulation.


So, Maxime, ["I'm not running random binaries."] you are apparently not
"susceptible to further manipulation." :)

Good for you, but what about warning less sophisticated guix noobs more actively?

--
Regards,
Bengt Richter
Haider Mirza wrote 3 years ago
(address . 54941@debbugs.gnu.org)
87bkwvzgg3.fsf@smtp.gmail.com
Toggle quote (4 lines)
> (This is not to accuse you Haider, who I don't know, of probing Maxime
> -- but consider the seemingly casual example you are setting for noobs
> in suggesting running an unknown (to others) binary).

Sorry about that, usually Github Repositories ask for some way to
reproduce a bug so they can try and debug it. I had expected him to
have ran the binary in a VM. But like you said it might not be apparent
to the less experienced.

Toggle quote (6 lines)
> The con starts off as many that target individuals do
> nowadays: With a text message. In this case it's not a
> phishing attempt, it's an attempt to ascertain whether the
> person receiving the message is susceptible to further
> manipulation.

Looking back, that really did seem quite manipulative, worse with the
repository not even with a license. Thanks for spotting this out and
making me realize my mistake.

All the best,
Haider.
-----BEGIN PGP SIGNATURE-----

iQJFBAEBCAAvFiEEAjeuCmF0doTqepNfLFLbI14Ps2wFAmJgYwIRHHg3YW5kN0Bn
bWFpbC5jb20ACgkQLFLbI14Ps2xHFQ//W2D6mQ03bKNLFxegKffhCy8Cj4SqenJF
aV6/rcoSQvzTX177SWo5zU2M+Ge1pDJ28VuZLCNDiaVTnRwZhnk1NqRgFSQ0iYNX
FNOKt1KmUXuuP09ka0NOea92tA8IV+kcP7PI4B57NE3AKsas2lO/y4GDE3vO8iHC
VMzvqUaCujeI2IS9Tl1uGlgP38esnb2gDI5GeF2cSNlHIQ+t8x+VcqyhS4auI4iW
Kn3BAdaJlgHdUj8Z0cUePjJugJNTFqKG6xr95MMZkm4HuDpPP4P5LdmQ/38ZsQT4
EK7kmI48+Kd8FeQu/T0o9IwixcuE3PqcBw3+DMaAH7+nM8+xnPwPBV4YzUThDhwF
5guCXt0Xu/56ur+WUOgOiRv9hqseckqJ6WFPIQPheam1kcYIwEDZm+MMBdiZ9AiD
KbSiMImqtu0gYKZ89KkhO3WirlCWaFeeoA2tZM9s/TG7Hzdjpf7GVtwulFHGD/rc
fr4Q3wasxHXsccd3VD4RpP3pAxt7C8wsaW4PFZ2sZzW6Xz32QwgX9VPvJuTpW8MN
7ttPwXxzHxN9e9npF2XyfM5pJ9NndjTCLYBfMFf5jBPlj+6ZPL5viANZ4RYnsQwp
13pZ8tJZbmoszbZhzeA4SzGKeFDUx5jrKB+H0T8tQrQG8SOB84J66lFSEOvvHGip
pCkf4odvDKo=
=TCR4
-----END PGP SIGNATURE-----

Maxime Devos wrote 3 years ago
(address . 54941@debbugs.gnu.org)
03981b0da225716e345a0246926f30491a99914c.camel@telenet.be
Haider Mirza schreef op wo 20-04-2022 om 20:46 [+0100]:
Toggle quote (11 lines)
> > (This is not to accuse you Haider, who I don't know, of probing
> Maxime
> > -- but consider the seemingly casual example you are setting for
> noobs
> > in suggesting running an unknown (to others) binary).
>
> Sorry about that, usually Github Repositories ask for some way to
> reproduce a bug so they can try and debug it. I had expected him to
> have ran the binary in a VM. But like you said it might not be
> apparent to the less experienced.

Where does the ‘him’ come from? I don't think I've ever implied that
pronoun.

Also, while making a VM, installing some OS, downloading a binary
inside and running it inside, is definitely technically possible, I
consider it time better spent doing other things with a (to me) higher
value / cost (e.g. reviewing a package definition for ld50-silent-
syphoon, investigating actual bugs(*), some infrastructure patches
...).

(*) Only binaries made from within Guix can feasibly be supported by
Guix, though some separate entities aim to support this to some degree.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYmQRhBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7puJAP0VPIHQJqeSskuRmORBI/DYAiA7
Oy5FERztZQksYlS89wD/QGAUMrJaiQeVPYlwl1Jzhb6gEy0liiEz1O3Z22liIAM=
=OaNS
-----END PGP SIGNATURE-----


?
Your comment

This issue is archived.

To comment on this conversation send an email to 54941@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 54941
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help