Note that the live ISO seems somewhat behind with Linux kernel 6.7.1.arch1-1 and 384 packages to upgrade. This already makes me wonder, is this a good pre-condition for using pacman --sysroot in the first place?
Thank you for any pointers into the right direction!
[root@EndeavourOS _repair]# pacman-static -U ./gnupg-2.4.5-1-x86_64.pkg.tar.zst ./gpgme-1.23.2-1-x86_64.pkg.tar.zst
loading packages...
warning: gnupg-2.4.5-1 is up to date -- reinstalling
warning: gpgme-1.23.2-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
Package (2) Old Version New Version Net Change
gnupg 2.4.5-1 2.4.5-1 9.62 MiB
gpgme 1.23.2-1 1.23.2-1 0.00 MiB
Total Installed Size: 11.10 MiB
Net Upgrade Size: 9.62 MiB
:: Proceed with installation? [Y/n]
(2/2) checking keys in keyring [---------------------------------------------] 100%
(2/2) checking package integrity [---------------------------------------------] 100%
(2/2) loading package files [---------------------------------------------] 100%
(2/2) checking for file conflicts [---------------------------------------------] 100%
error: failed to commit transaction (conflicting files)
gnupg: /usr/bin/addgnupghome exists in filesystem
gnupg: /usr/bin/applygnupgdefaults exists in filesystem
gnupg: /usr/bin/dirmngr exists in filesystem
...
gnupg: /usr/share/man/man8/addgnupghome.8.gz exists in filesystem
gnupg: /usr/share/man/man8/applygnupgdefaults.8.gz exists in filesystem
gnupg: /usr/share/man/man8/dirmngr.8.gz exists in filesystem
Errors occurred, no packages were upgraded.
wget doesn’t work on chroot by the way, I am getting everything through the live-iso, then copying it into /mnt. sudo doens’t work either.
ldconfig: File /usr/lib/libGLX_nvidia.so is empty, not checked.
ldconfig: File /usr/lib/libunwind-setjmp.so.0.0.0 is empty, not checked.
ldconfig: File /usr/lib/libOSMesa.so is empty, not checked.
ldconfig: File /usr/lib/libnvidia-opticalflow.so.550.54.14 is empty, not checked.
...
... lots more of these ...
... and then ...
...
:: Running post-transaction hooks...
(1/5) Reloading system manager configuration...
systemd-detect-virt: error while loading shared libraries: /usr/lib/liblzma.so.5: file too short
Skipped: Current root is not booted.
(2/5) Reloading user manager configuration...
systemd-detect-virt: error while loading shared libraries: /usr/lib/liblzma.so.5: file too short
Skipped: Current root is not booted.
(3/5) Arming ConditionNeedsUpdate...
(4/5) Checking which packages need to be rebuilt
join: /dev/fd/63: No such file or directory
grep: error while loading shared libraries: /usr/lib/libpcre2-8.so.0: file too short
pacconf: error while loading shared libraries: /usr/lib/libexpat.so.1: file too short
grep: error while loading shared libraries: /usr/lib/libpcre2-8.so.0: file too short
pactree: error while loading shared libraries: /usr/lib/libexpat.so.1: file too short
pacconf: error while loading shared libraries: /usr/lib/libexpat.so.1: file too short
pactree: error while loading shared libraries: /usr/lib/libexpat.so.1: file too short
pacman: error while loading shared libraries: /usr/lib/libexpat.so.1: file too short
comm: /dev/fd/62: No such file or directory
pacman: error while loading shared libraries: /usr/lib/libexpat.so.1: file too short
ps: error while loading shared libraries: /usr/lib/liblzma.so.5: file too short
lscpu: failed to determine number of CPUs: /sys/devices/system/cpu/possible: No such file or directory
grep: error while loading shared libraries: /usr/lib/libpcre2-8.so.0: file too short
tee: /tmp/tmp.zYeROZLDLR/16291: No such file or directory
comm: /dev/fd/62: No such file or directory
pacconf: error while loading shared libraries: /usr/lib/libexpat.so.1: file too short
pacman: error while loading shared libraries: /usr/lib/libexpat.so.1: file too short
tee: /tmp/tmp.zYeROZLDLR/29006: No such file or directory
pacconf: error while loading shared libraries: /usr/lib/libexpat.so.1: file too short
comm: /dev/fd/62: No such file or directory
pacman: error while loading shared libraries: /usr/lib/libexpat.so.1: file too short
(5/5) Updating the info directory file...
You can manually download the broken library packages from a mirror and install them with pacman-static -U as we did above. This may take some time but will get your system back intact eventually.
So, with the first option that would be libexpat, libpcre, and liblzma? Or will there be more after I have patched these, and there could be other upstream dependencies?
Package (7) Old Version New Version Net Change
audit 4.0.1-2 4.0.1-2 1.02 MiB
expat 2.6.2-1 2.6.2-1 0.00 MiB
gnupg 2.4.5-1 2.4.5-1 0.00 MiB
gpgme 1.23.2-1 1.23.2-1 0.00 MiB
libunistring 1.2-1 1.2-1 2.49 MiB
pcre2 10.43-1 10.43-1 0.00 MiB
xz 5.6.1-1 5.6.1-1 0.00 MiB
First I got:
:: Running post-transaction hooks...
(1/6) Reloading system manager configuration...
Skipped: Running in chroot.
(2/6) Reloading user manager configuration...
Skipped: Running in chroot.
(3/6) Creating temporary files...
/proc/ is not mounted, but required for successful operation of systemd-tmpfiles. Please mount /proc/. Alternatively, consider using the --root= or --image= switches.
error: command failed to execute correctly
(4/6) Arming ConditionNeedsUpdate...
(5/6) Checking which packages need to be rebuilt
join: /dev/fd/63: No such file or directory
Error, do this: mount -t proc proc /proc
lscpu: failed to determine number of CPUs: /sys/devices/system/cpu/possible: No such file or directory
comm: /dev/fd/62: No such file or directory
tee: /tmp/tmp.AC7WjPyhwq/3131: No such file or directory
comm: /dev/fd/62: No such file or directory
tee: /tmp/tmp.AC7WjPyhwq/9330: No such file or directory
comm: /dev/fd/62: No such file or directory
(6/6) Updating the info directory file...
I have then mounted/bound /proc, /dev and /sys and now it seems successful:
... still lots of these ...
dconfig: File /usr/lib/libGLX_nvidia.so is empty, not checked.
ldconfig: File /usr/lib/libunwind-setjmp.so.0.0.0 is empty, not checked.
ldconfig: File /usr/lib/libOSMesa.so is empty, not checked.
...
:: Running post-transaction hooks...
(1/6) Reloading system manager configuration...
Skipped: Running in chroot.
(2/6) Reloading user manager configuration...
Skipped: Running in chroot.
(3/6) Creating temporary files...
(4/6) Arming ConditionNeedsUpdate...
(5/6) Checking which packages need to be rebuilt
fatal library error, lookup self
(6/6) Updating the info directory file...
But a subsequent pacman-static -Syu is still resulting in
:: Retrieving packages...
run-parts-5.17-1-x86_64 29.3 KiB 175 KiB/s 00:00 [---------------------------------------------] 100%
zsh-5.9-5-x86_64 2.2 MiB 2.59 MiB/s 00:01 [---------------------------------------------] 100%
Total (2/2) 2.2 MiB 2.53 MiB/s 00:01 [---------------------------------------------] 100%
(2/2) checking keys in keyring [---------------------------------------------] 100%
error: GPGME error: Invalid crypto engine
error: GPGME error: Invalid crypto engine
(2/2) checking package integrity [---------------------------------------------] 100%
error: GPGME error: Invalid crypto engine
error: GPGME error: Invalid crypto engine
error: run-parts: missing required signature
:: File /var/cache/pacman/pkg/run-parts-5.17-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n]
error: zsh: missing required signature
:: File /var/cache/pacman/pkg/zsh-5.9-5-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n]
error: failed to commit transaction (invalid or corrupted package (PGP signature))
Errors occurred, no packages were upgraded.
It could also be a dependency issue caused by the partial update.
@dalto I found this issue and also reinstalled gpgme. There are no more errors hinting at dependencies though, how to narrow down on other potentially corrupted dependencies?
(1/2) Arming ConditionNeedsUpdate...
(2/2) Checking which packages need to be rebuilt
fatal library error, lookup self
After rm -r /var/lib/pacman/sync/ I am getting a successful pacman -Syu.
I will try to re-initialize keys though.
Commands like nvim still don’t work, so I guess I’ve still got to reinstall all my package. Wondering what’s the best way to do that, without marking all packages as explicitly installed. pacman -Qnq | pacman -S? (as per Arch docs)