You are not logged in.
Pages: 1
Ive been using Arch for a few years now, and it only crashed during Syu once -- booted into usb, chrooted etc the fix didnt end up being that complicated.
However, it happened again today, and I'm not finding the solution -- I booted into the usb again, mounted partitions and...
# arch-chroot /mnt
/bin/bash: error while loading shared libraries: /usr/lib/libncursesw.so.6: file too shortI tried to
pacman --sysroot /mnt -S ncursesbut got
warning: Public keyring not found; have you run 'pacman-key --init'?
error: keyring is not writable
error: required key missing from keyring
error: failed to commit transaction (could not find or read file)Pinging works and the system clock is synched, i tried pacman-key --init and then --populate and got
ERROR: There is no secret key available to sign with.I also can't remove gnupg since "Device or resource busy"
I really needed to boot ahahah... Any help ?
EDIT: I init and populate sucessfully but pacman still says the same errors.
EDIT2: OK, so, I forcefully reinstalled all packages ( backing up the binaries first ofc ) as per this thread adding "--root=/mnt --cachedir=/mnt/var/cache/pacman/pkg" as suggested by seth ( thank you very much seth ) since I couldn't really do anything while chrooted. Afterwards I chrooted again, and voila, shit worked, so I could regen the keys, do the update, delete an empty mkinitcpio preset file, reinstall the kernel and reboot ![]()
Last edited by Henrytorybot (2024-06-20 02:22:43)
Offline
ncurses is broken => everything is broken => you cannot chroot and --sysroot probably will fail as well at some point
Instead use "pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg" and don't use a too old install iso to have an up-to-date keyring for the pacman version on the iso.
Online
ncurses is broken => everything is broken => you cannot chroot and --sysroot probably will fail as well at some point
Instead use "pacman --root=/mnt --cachedir=/mnt/var/cache/pacman/pkg" and don't use a too old install iso to have an up-to-date keyring for the pacman version on the iso.
Thank you, I managed to force reinstall ncurses with the above method ( using --overwrite, because pacman refused to do anything "<file related to ncurses> exists in filesystem" ) and chroot. However... it seems that nothing works in chroot, so I tried to -Syu the same way I reinstalled ncurses but it seems every other package suffers from "exists in filesystem" problem. Is it safe to overwrite every single package and -Syu this way ?
Last edited by Henrytorybot (2024-06-19 22:06:14)
Offline
For completeness:
Is it safe to overwrite every single package and -Syu this way ?
https://wiki.archlinux.org/title/System … n_commands
That's where the --dbonly pass comes in, you're getting most (probably all) of those errors because you're missing the mtree data.
Fixing those first will isolate actual problems and prevent you from steamrolling over them.
Also, as you figured, -Syu doesn't cut it because it only runs updates but will not implicitly re-install damaged packages - you've to either re-install them all or selectively the broken ones.
Online
Pages: 1