I make it executable via chmod +x and try to run it via ./zot.
Unfortunately I am greeted with:
Could not start dynamically linked executable: ./bin/zot
NixOS cannot run dynamically linked executables intended for generic
linux environments out of the box. For more information, see:
https://nix.dev/permalink/stub-ld
I am surprised as this is a statically linked go executable, double checking with ldd and patchelf reveals:
ldd ./zot
statically linked
patchelf --print-needed ./zot
# (no output)
Any idea why I am unable to run the executable as is?
$ file ./zot-linux-amd64
./zot-linux-amd64: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=a50843f066a0cb4f61262d0f59e6b82795c0579d, stripped
$ strace ./zot-linux-amd64
execve("./zot-linux-amd64", ["./zot-linux-amd64"], 0x7ffde3945a20 /* 77 vars */) = -1 ENOENT (No such file or directory)
strace: exec: No such file or directory
+++ exited with 1 +++
/lib64/ld-linux-x86-64.so.2 is the glibc loader, so I imagine this is dynamically linked against glibc.