Installation Failed with pacstrap error

Recently when I was trying to install EndeavourOS it keeps getting all kinds of pacstrap errors. A few days ago it was about a conflict between exfat-utils and exfatprogs, and now it becomes a libinih key problem?

...
2022-04-26 - 18:31:41 [6]: [PYTHON JOB]: "pacstrap: fuse-common-3.10.5-1-x86_64 downloading..." 
2022-04-26 - 18:31:41 [6]: [PYTHON JOB]: "pacstrap: base-2-2-any downloading..." 
2022-04-26 - 18:31:41 [6]: [PYTHON JOB]: "pacstrap: ca-certificates-20210603-1-any downloading..." 
2022-04-26 - 18:31:41 [6]: [PYTHON JOB]: "pacstrap: checking keyring..." 
2022-04-26 - 18:31:41 [6]: [PYTHON JOB]: "pacstrap: downloading required keys..." 
2022-04-26 - 18:31:41 [6]: [PYTHON JOB]: "pacstrap: :: Import PGP key 0F65C7D881506130, \"Maxime Gauduin <alucryd@archlinux.org>\"? [Y/n]" 
2022-04-26 - 18:31:41 [6]: [PYTHON JOB]: "pacstrap: checking package integrity..." 
2022-04-26 - 18:31:46 [6]: [PYTHON JOB]: "pacstrap: error: libinih: key \"95220BE99CE6FF778AE0DC670F65C7D881506130\" is unknown" 
2022-04-26 - 18:31:48 [6]: [PYTHON JOB]: "pacstrap: :: Import PGP key 95220BE99CE6FF778AE0DC670F65C7D881506130? [Y/n]" 
2022-04-26 - 18:31:48 [6]: [PYTHON JOB]: "pacstrap: :: File /var/cache/pacman/pkg/libinih-55-2-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature))." 
2022-04-26 - 18:31:48 [6]: [PYTHON JOB]: "pacstrap: Do you want to delete it? [Y/n] error: failed to commit transaction (invalid or corrupted package)" 
2022-04-26 - 18:31:48 [6]: [PYTHON JOB]: "pacstrap: Errors occurred, no packages were upgraded." 
2022-04-26 - 18:31:48 [6]: [PYTHON JOB]: "pacstrap: ==> ERROR: Failed to install packages to new root" 
2022-04-26 - 18:31:48 [6]: virtual void Calamares::JobThread::run()
    Skipping non-emergency job "Generate machine-id." 
...
2022-04-26 - 18:31:48 [1]: void Calamares::ViewManager::onInstallationFailed(const QString&, const QString&)
    ERROR: Installation failed: "Failed to run pacstrap" 
2022-04-26 - 18:31:48 [6]:     .. - message: "Failed to run pacstrap" 
2022-04-26 - 18:31:48 [6]:     .. - details: Failed to run pacman
2022-04-26 - 18:31:48 [6]: void Calamares::ViewManager::onInstallationFailed(const QString&, const QString&)
    Calamares will quit when the dialog closes. 
2022-04-26 - 18:31:48 [6]: QML Component (default slideshow) deactivated
2022-04-26 - 18:31:48 [6]: void Config::doNotify(bool, bool)
    Notification not sent; completion: failed 

I was trying to install the BSPWM community edition but I think any other version with online installation has the same problem. The only workaround for me right now is to use offline installation. I tried it on both a virtual machine (VirtualBox) and a physical machine, and I got the same results. Any idea what is causing this? (Also, this is my first post here so if I wrote anything inappropriate please be nice to me :P)

Update:
For anyone still not sure how to fix this, do the following steps:

  1. before running calamares installer, open a terminal and run
sudo pacman -Sy archlinux-keyring
  1. then you start the calamares as usual and install either online or offline

Note: yes you run the command outside the installer

Big thank to @pycrk for the solution and @Greyed for clarification

Update2:
It seems the issue has been fixed by HotFix:
Apollo ISO bug is fixed for most users and also a workaround for those who need it

3 Likes

Welcome to the forum!

Which ISO are you using?

I’m using EndeavourOS_Apollo_22_1.iso. I tried an old one but it had the same issue. As I mentioned the offline installation works and the problem seems to be something related to the sources of pactrap.

I have the same problem right now (even same error in log), I use VMware as a VM software.

I’ve created multiple Virtual Machines with different VM settings & different Installation settings.

I got it working on one of the VMs, but I don’t know what made the installation in that VM work…

If I find the solution, I will update you.

1 Like

Hi @DiamondSlug welcome :slight_smile:

i have updated my EOS installation now and become also an error. with the same package: libinih

the file is corrupted or invalid PGP Signature

Fehler: libinih: signature from "Maxime Gauduin <alucryd@gmail.com>" is marginal trust
:: Datei /var/cache/pacman/pkg/libinih-55-2-x86_64.pkg.tar.zst ist beschädigt (Ungültiges oder beschädigtes Paket (PGP-Signatur)).

1 Like

welcome

2 Likes

i have fix it, i updated the keyring and my system without any problem.

sudo pacman -Sy archlinux-keyring

sudo pacman -Syu

7 Likes

Thank you! The first command worked!

I’d like to to know more about how this error occurred. Was it because the core library package “libinih” got updated and therefore got a new PGP-key, and the Installer is checking it against the outdated PGP-key that came with the ISO ? I’m just curious :slight_smile:

1 Like

Just tried it on a physical machine and it works! Again, thank you so much! :smiley:

1 Like

did you end up doing the offline installation and running the command? if so, how would you be able to run the bspwm installer after that?

With the Offline installer you can only install the Xfce edition. All other editions require the online installer.

1 Like

I came here to post about this. I ran in to the same issue. Silly question - shouldn’t the installer update keys prior to downloading anything from the live environment? I get that this probably doesn’t happen often (keys being rotated my guess) but still, seems a sensible step to take.

1 Like

Hi @cyangalaxy,

yes the PGP Key from the package libinih was new and the archlinux-keyring(on my laptop) was outdated, when the system compares the keys, the system gets in trouble. I am not sure about the procedure in the ISO installer.

https://wiki.archlinux.org/title/Pacman/Package_signing#Upgrade_system_regularly
https://wiki.archlinux.org/title/Pacman/Package_signing

1 Like

hey I’m experiencing the same error. How do I run these commands within the calamares installer?

It is outside the installer. On the lower left corner of the live environment there are a few pinned icons to the task bar. One is for the terminal. Open the terminal and run:

sudo pacman -Sy archlinux-keyring

I would advise running the “Update Mirrors” task in the Welcome app before doing so. If you don’t you run the risk of hitting an unresponsive mirror.

3 Likes

I guess they will fix it if needs a fix.
FWIW as from your posted link, I took the time and set this command in pacseek settings:

sudo pacman ---needed Sy archlinux-keyring && sudo pacman -Su

If having other repos, add their keyrings packages in the command. :wink:

1 Like

See https://forum.endeavouros.com/t/apollo-iso-bug-is-fixed-for-most-users-and-also-a-workaround-for-those-who-need-it/

3 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.