Hello.
I don’t know what’s wrong, I installed manjaro yesterday and I successfully installed some packages, no problem there.
Then this morning I went to update my system, I ran sudo pacman -Syu
, it asked do you want to import some keys? I said ok, import them.
Now for ANY package I want to update, I get this error message:
:: File /var/cache/pacman/pkg/bla-bla-bla.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n]
I tried changing my mirrors to different countries and even global mirrors. Problem exists.
I tried running pacman-key
:
sudo pacman-key --init
sudo pacman-key --populate archlinux manjaro
sudo pacman-key --refresh-keys
this also didn’t help.
Even for updating archlinux-keyring
package I get error:
~ sudo pacman -Syy archlinux-keyring INT ✘
[sudo] password for mahdi:
:: Synchronizing package databases...
core 140.9 KiB 139 KiB/s 00:01 [##########################################] 100%
extra 8.4 MiB 511 KiB/s 00:17 [##########################################] 100%
multilib 145.4 KiB 170 KiB/s 00:01 [##########################################] 100%
warning: archlinux-keyring-20240609-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
Packages (1) archlinux-keyring-20240609-1
Total Installed Size: 1.66 MiB
:: Proceed with installation? [Y/n] Y
(1/1) checking keys in keyring [##########################################] 100%
(1/1) checking package integrity [##########################################] 100%
error: archlinux-keyring: signature from "Christian Hesse <eworm@archlinux.org>" is invalid
:: File /var/cache/pacman/pkg/archlinux-keyring-20240609-1-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] n
error: failed to commit transaction (invalid or corrupted package (PGP signature))
Errors occurred, no packages were upgraded.
I almost search the whole first page of Google and Brave search pages about this… please help 
Don’t refresh the keys.
Try with the awesome script from this post [HowTo] Work around gpg verification issue on left behind systems
Didn’t help. it goes through some kind of loop when I run it:
Cache directory: /var/cache/pacman/pkg/
:: Do you want to remove ALL files from cache? [y/N]
Database directory: /var/lib/pacman/
:: Do you want to remove unused repositories? [Y/n]
removing unused sync repositories...
[QUESTION] Delete them? [Yy/Nn]
[Yy/Nn] > Y
[INFO] Removing package cache
Cache directory: /var/cache/pacman/pkg/
:: Do you want to remove ALL files from cache? [y/N]
Database directory: /var/lib/pacman/
:: Do you want to remove unused repositories? [Y/n]
removing unused sync repositories...
[QUESTION] Delete them? [Yy/Nn]
[Yy/Nn] > Y
[INFO] Removing package cache
Cache directory: /var/cache/pacman/pkg/
:: Do you want to remove ALL files from cache? [y/N]
Database directory: /var/lib/pacman/
:: Do you want to remove unused repositories? [Y/n]
removing unused sync repositories...
[QUESTION] Delete them? [Yy/Nn]
[Yy/Nn] > y
[INFO] Removing package cache
Cache directory: /var/cache/pacman/pkg/
:: Do you want to remove ALL files from cache? [y/N]
Database directory: /var/lib/pacman/
:: Do you want to remove unused repositories? [Y/n]
removing unused sync repositories...
[QUESTION] Delete them? [Yy/Nn]
[Yy/Nn] > y
[INFO] Removing package cache
Cache directory: /var/cache/pacman/pkg/
:: Do you want to remove ALL files from cache? [y/N]
Database directory: /var/lib/pacman/
:: Do you want to remove unused repositories? [Y/n]
removing unused sync repositories...
[QUESTION] Delete them? [Yy/Nn]
[Yy/Nn] > y
[INFO] Removing package cache
Cache directory: /var/cache/pacman/pkg/
:: Do you want to remove ALL files from cache? [y/N]
Database directory: /var/lib/pacman/
:: Do you want to remove unused repositories? [Y/n]
removing unused sync repositories...
[QUESTION] Delete them? [Yy/Nn]
[Yy/Nn] > y
[INFO] Removing package cache
Cache directory: /var/cache/pacman/pkg/
:: Do you want to remove ALL files from cache? [y/N]
Database directory: /var/lib/pacman/
:: Do you want to remove unused repositories? [Y/n]
removing unused sync repositories...
[QUESTION] Delete them? [Yy/Nn]
[Yy/Nn] > ^C
But I tried running aggressive mode by executing each command the bash script would run manually, then I tried updating a single package from global repository, and this still happens:
~/Documents sudo pacman -Sy adw-gtk-theme ✔ 9s
:: Synchronizing package databases...
core is up to date
extra is up to date
multilib is up to date
resolving dependencies...
looking for conflicting packages...
Packages (2) glib2-devel-2.80.3-2 adw-gtk-theme-1.1-2
Total Download Size: 0.18 MiB
Total Installed Size: 1.19 MiB
Net Upgrade Size: 1.19 MiB
:: Proceed with installation? [Y/n] Y
:: Retrieving packages...
adw-gtk-theme-1.1-2-any 22.8 KiB 7.90 KiB/s 00:03 [#############################################################################] 100%
glib2-devel-2.80.3-2-x86_64 157.9 KiB 50.1 KiB/s 00:03 [#############################################################################] 100%
Total (2/2) 180.7 KiB 54.8 KiB/s 00:03 [#############################################################################] 100%
(2/2) checking keys in keyring [#############################################################################] 100%
downloading required keys...
:: Import PGP key B8AC08600F108CDF, "Jan Alexander Steffens (heftig) <heftig@archlinux.org>"? [Y/n] Y
:: Import PGP key 150C200743ED46D8, "Mark Wagie <mark@manjaro.org>"? [Y/n] Y
(2/2) checking package integrity [#############################################################################] 100%
error: glib2-devel: signature from "Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>" is unknown trust
:: File /var/cache/pacman/pkg/glib2-devel-2.80.3-2-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] Y
error: adw-gtk-theme: signature from "Mark Wagie <mark@manjaro.org>" is unknown trust
:: File /var/cache/pacman/pkg/adw-gtk-theme-1.1-2-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] n
error: failed to commit transaction (invalid or corrupted package (PGP signature))
Errors occurred, no packages were upgraded.
One often overlooked reason is a mirror configured to send HTML instead of 404.
I did a lengthy research on that back when I was a mirror provider and experimented with disallowing directory browsing and sending back a user friendly message instead of the server’s standard not allowed message.
The friendly message caused pacman to accept the data but when later parsed by alpm it caused messages like those you are getting.
You may be able to work around it by refreshing your mirror list using pacman-mirrors.
sudo pacman-mirrors -g
It is recommended to be more specific - the above process can be lenghty - to get a list of countries
pacman-mirrors -l
or you could narrow the pool down to continent - which will use geo-location on your public ip address to deduce the continent
sudo pacman-mirrors --continent
For further details see
man pacman-mirrors
Or the source at
Also see the wiki page on pacman-mirrors at
Ok. I executed the script with bash (i was running it with zsh) and loop problem is fixed.
I even ran it on aggressive mode.
Problem still exists. I even tried finishing the script when it asks for full system upgrade, and i choosed yes.
Again I’m seeing similar errors.
I already tried changing mirrors to global, Germany, and some other countries and downloading all the packages again from that mirror all over again.
Obviously you should ensure the first mirror in the list is not the same as last time.
You can set a specific mirror - it is often used with CI builds
sudo pacman-mirrors --api --set-url https://mirror.easyname.at/manjaro
Or you can limit your preferred pool
sudo pacman-mirrors -i -c at
Please see the pacman-mirrors manual
The current list of countries
$ pacman-mirrors -l
Australia
Austria
Bangladesh
Belarus
Belgium
Brazil
Bulgaria
Canada
Chile
China
Colombia
Costa_Rica
Czechia
Denmark
Estonia
France
Georgia
Germany
Global
Greece
Hungary
India
Indonesia
Iran
Italy
Japan
Kenya
Mauritius
Netherlands
New_Zealand
Norway
Poland
Portugal
Russia
Serbia
Singapore
South_Africa
South_Korea
Spain
Sweden
Switzerland
Taiwan
Thailand
Turkey
Ukraine
United_Kingdom
United_States
Uruguay
Uzbekistan
I did all that. I tried downloading from multiple countries, continents and many times with global mirror.
This is not the problem I’m 99.99999% sure about this…
Something I may need to say…
The kernel paniced during the first attempt to update the system. It never finished downloading the packages, so I don’t know if I’d get any error, but I had to reboot and try again.
I got this error after reboot and try updating again…
Hmmm - OK - half an hour ago I tested installing the glib2-devel package - just for the sake of testing
$ sudo pacman -Syu glib2-devel
[sudo] password for fh:
:: Synchronizing package databases...
core is up to date
extra 8,4 MiB 9,42 MiB/s 00:01 [######################################################] 100%
multilib is up to date
sublime-text is up to date
:: Starting full system upgrade...
warning: nano-syntax-highlighting: local (2020.10.10+10+g1aa64a8-2) is newer than extra (2020.10.10-1)
resolving dependencies...
looking for conflicting packages...
Packages (1) glib2-devel-2.80.3-2
Total Download Size: 0,15 MiB
Total Installed Size: 1,19 MiB
:: Proceed with installation? [Y/n]
:: Retrieving packages...
glib2-devel-2.80.3-2-x86_64 157,9 KiB 801 KiB/s 00:00 [######################################################] 100%
(1/1) checking keys in keyring [######################################################] 100%
(1/1) checking package integrity [######################################################] 100%
(1/1) loading package files [######################################################] 100%
(1/1) checking for file conflicts [######################################################] 100%
(1/1) checking available disk space [######################################################] 100%
:: Processing package changes...
(1/1) installing glib2-devel [######################################################] 100%
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Refreshing PackageKit...
A step by step guide can be found on the wiki
I reinstalled manjaro.
I think that kernel panic during first update breaked something…