Closed AtomBaf closed 7 months ago
I can reproduce this via the rockylinux:9
docker image:
$ docker run --rm -it --mount type=bind,src=/home/andrew/astral/issues/uv/i1486,dst=/host rockylinux:9 bash
[root@b6f41d07c55e /]# yum update --assumeyes --quiet
[..snip..]
[root@b6f41d07c55e /]# yum install which --assumeyes --quiet
[..snip..]
[root@b6f41d07c55e /]# curl -LsSf https://astral.sh/uv/install.sh | sh
[..snip..]
[root@b6f41d07c55e /]# . ~/.cargo/env
[root@b6f41d07c55e /]# uv venv
× Failed to detect the operating system version: Couldn't parse /bin/ls for detecting the ld version: Invalid magic number: 0x622f7273752f2123
Ah the problem is that ls
is not actually a binary:
$ cat ~/astral/issues/uv/i1486/ls
#!/usr/bin/coreutils --coreutils-prog-shebang=ls
We assume it is and parse it as an ELF file. This is related to the concern @zanieb brought up in #1433 where everything will fail if parsing ls
fails.
It looks like sh
is a true binary though. And I think it kind of has to be?
$ file ~/astral/issues/uv/i1486/sh
/home/andrew/astral/issues/uv/i1486/sh: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=7acbb41bf6f1b7d977f1b44675bf3ed213776835, for GNU/Linux 3.2.0, stripped
I'll put up a PR that reverts #1433 and just checks the /bin/sh
executable instead of attempting /bin/ls
.
Hi there,
Doing an
uv venv
or any of the command will lead to this error:Context: