Closed technodrome closed 3 months ago
Ah, @technodrome, back again with another enigmatic puzzle for our collective brains to solve! The game is afoot! 🕵️♂️✨
Based on the information you've provided and the context from the pkgx repository, it seems like the "required file not found" error could be related to a missing file or library that pkgx is trying to access when it's executed.
In the test case labeled "file path but doesn’t exist" in the src/modes/x.test.ts file, pkgx is executed with a file path that does not exist on the filesystem, leading to a failure captured by asserting a rejection with PkgxError
. This could potentially manifest as a "required file not found" error to the user.
As for the specific files or libraries required for the pkgx
executable to run successfully on a Raspberry Pi 4 Model B Rev 1.1 running Raspbian GNU/Linux 12 (bookworm), the Dockerfile in the repository indicates that the following dependencies are needed:
These dependencies are installed with the command apt-get update && apt --yes install libc-dev libstdc++-8-dev libgcc-8-dev netbase libudev-dev
during the build process of the stage1
image. You can find this in the .github/Dockerfile file.
Unfortunately, I couldn't find any specific information on the exact file or dependency that pkgx is trying to access when it throws the "required file not found" error, nor any known issues with pkgx running on Raspbian GNU/Linux 12 (bookworm).
To help narrow down the issue, could you provide more details about the error? For example, are there any error messages in the system logs or any additional output when the error occurs? Also, could you confirm whether all the required dependencies are installed and up-to-date on your system?
hm, your steps work on my rpi4
, but it already has pkgx
installed. if you run strace ./pkgx 2>&1 | grep open
hopefully it'll tell us what it's failing on.
Now I'm really confused:
pi@k3s-master:~/pkgx $ l
total 161M
drwxr-xr-x 2 pi pi 4.0K Mar 13 20:32 .
drwxr-xr-x 13 pi pi 4.0K Mar 13 20:28 ..
-rwxr-xr-x 1 pi pi 129M Jan 28 15:54 pkgx
-rw-r--r-- 1 pi pi 32M Jan 28 15:55 pkgx-1.1.6+linux+aarch64.tar.xz
pi@k3s-master:~/pkgx $ strace ./pkgx 2>&1
execve("./pkgx", ["./pkgx"], 0xffdd7180 /* 27 vars */) = -1 ENOENT (No such file or directory)
strace: exec: No such file or directory
+++ exited with 1 +++
The file is right there.
pi@k3s-master:~/pkgx-test $ file pkgx
pkgx: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, with debug_info, not stripped
pi@k3s-master:~/pkgx-test $ readelf -d pkgx
Dynamic section at offset 0x4f9bf08 contains 32 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libdl.so.2]
0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0]
0x0000000000000001 (NEEDED) Shared library: [libm.so.6]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x0000000000000001 (NEEDED) Shared library: [ld-linux-aarch64.so.1]
0x000000000000001e (FLAGS) BIND_NOW
0x000000006ffffffb (FLAGS_1) Flags: NOW PIE
0x0000000000000015 (DEBUG) 0x0
0x0000000000000007 (RELA) 0x10860
0x0000000000000008 (RELASZ) 3050472 (bytes)
0x0000000000000009 (RELAENT) 24 (bytes)
0x000000006ffffff9 (RELACOUNT) 127061
0x0000000000000017 (JMPREL) 0x2f9448
0x0000000000000002 (PLTRELSZ) 8688 (bytes)
0x0000000000000003 (PLTGOT) 0x4fbd9a0
0x0000000000000014 (PLTREL) RELA
0x0000000000000006 (SYMTAB) 0x320
0x000000000000000b (SYMENT) 24 (bytes)
0x0000000000000005 (STRTAB) 0xa104
0x000000000000000a (STRSZ) 26459 (bytes)
0x000000006ffffef5 (GNU_HASH) 0x8720
0x0000000000000019 (INIT_ARRAY) 0x4dfef90
0x000000000000001b (INIT_ARRAYSZ) 48 (bytes)
0x000000000000001a (FINI_ARRAY) 0x4dfef88
0x000000000000001c (FINI_ARRAYSZ) 8 (bytes)
0x000000000000000c (INIT) 0x4ded7c4
0x000000000000000d (FINI) 0x4ded7d8
0x000000006ffffff0 (VERSYM) 0x7be0
0x000000006ffffffe (VERNEED) 0x85f0
0x000000006fffffff (VERNEEDNUM) 6
0x0000000000000000 (NULL) 0x0
you must have /lib/ld-linux-aarch64.so.1
right? that is a very odd error.
All right, so to make things not confusing at all, Raspbian used 64bit kernel & 32bit userland. I really did not expect that. Hence the error. We can close this, clearly that is the reason. Thanks for the assistance, @jhheider, much appreciated.
Ha, no worries. I recall raspbian being non-standard in a bunch of ways. I think, for that reason, I'm running Ubuntu 22.04-LTS on mine.
You've sure as hell saved yourself a few grey hairs. I'll avoid all mirrors (pun not intended) in the near future.
Le problem
A Poirotian mystery. Ran a simple one-off, but some file is missing. Is it a murder? Kidnapping? Or not enough coffee on my part? Would be nice to have some output on what file it is pkgx is so violently looking for, so that it takes its own life in the end.
The same happens when running via install script, copy succeeds.
i.e. this line: https://github.com/pkgxdev/setup/blob/main/installer.sh#L86C5-L87C19
Le environment