You are not logged in.

#1 2025-02-20 23:15:54

Xilian
Member
Registered: 2025-02-20
Posts: 3

[SOLVED] Problem with pacman: mirrors\gpg keys.

First, a little context :
I was coding using my terminal emulator, with graphics served by I3 and startx. Suddenly a window freezes, so I close I3 and see in my tty that X found an error. I reboot my pc, and get this error a couple of times so I suspect some problem with compatibilities.

The problem: (I'm sorry I can't paste any code fully. I can't access the forums through my tty)

I tried

pacman -Syu

but after a while I get some errors about a .tar file not being found and some http error. I searched the wiki and forums for solving mirror problems, and got recommendations which I tried :

-First, dumbest one. Try it again:

pacman -Syu 

now gave an error "unable to synchronize all databases"   which can be "fixed" by deleting db.lck

-Deleting the whole gnupg folder in /etc :

killall gpg-agent
rm -rf /etc/pacman.d/gnupg/ 

- Using pacman-key commands:

-pacman-keyring --refresh
-pacman-key --init 
-pacman-key --populate archlinux 

Most threads get up to this point and their problem is fixed. In my case, after trying to use pacman-key with the --populate option, I enter an infinite loop of text being printed to the terminal:

gpg: lockfile dissapeared

After this, no command works. Even writing ls prints out : -bash: /usr/bin/ls: Input/output error. After which I need to restart my pc to even try anything new

I also followed the steps here and instead of fixing the problem I get the same old loop:  https://www.reddit.com/r/archlinux/comm … messed_up/

Last edited by Xilian (2025-02-21 21:24:01)

Offline

#2 2025-02-21 02:38:59

Xilian
Member
Registered: 2025-02-20
Posts: 3

Re: [SOLVED] Problem with pacman: mirrors\gpg keys.

Well, I finally found the solution to this. Not sure what did the trick finally, but here we go:

When I tried to reinstall :

pacman -S pacman-mirrorlist

I would get an error about a .tar.pkg which was untrusted/corrupted.
When navigating to the directory in question, I found that it had many mirrors but not the one that
the error message showed.
So I tried:

ls -a | grep "pacman"

I got two mirrors as an output. DISCLAIMER: I do not know much about the subject, maybe this next step is a dumb idea...
I deleted the mirrors that had pacman in their name:

rm -f $(ls -a | grep "pacman")

This removes the mirrors that have pacman in their name (I hope).
After this, I ran :

pacman-key --list-sigs

The output were some keys in my pc, and there was one which matched the error I got while trying to reinstall: sudo pacman -S pacman-key
Then, I copied the signature which is a code in all-caps with numbers:

pacman-key -d <List_signature_here>

After this, running:

-pacman-key --init
-pacman-key --populate archlinux

And It worked well! Anyways, it seems like the i3 failing thing was about the update. As now it works like a charm!
Good travels!

Last edited by Xilian (2025-02-21 02:53:21)

Offline

#3 2025-02-21 07:47:00

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,418

Re: [SOLVED] Problem with pacman: mirrors\gpg keys.

The problem: (I'm sorry I can't paste any code fully. I can't access the forums through my tty)

1st link below

It's not really clear to me what the symptoms of any original issue were, but in doubt see https://archlinux.org/packages/extra/any/reflector/

Also please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Online

#4 2025-02-21 21:26:49

Xilian
Member
Registered: 2025-02-20
Posts: 3

Re: [SOLVED] Problem with pacman: mirrors\gpg keys.

Thanks seth, done! It's interesting, I had a list of mirrors generated by reflector. I was about to change it manually when I decided to use the other commands and it was fixed. Anyways, weird behaviour.

Offline

Board footer

Powered by FluxBB