Artix Linux Forum

Artix Linux => Package management => Topic started by: shako on 01 March 2023, 23:22:57

Title: [SOLVED] pacman -Syu fails to synchronize databases
Post by: shako on 01 March 2023, 23:22:57
Since this afternoon I get this error whenever I try to update my system:

Code: [Select]
:: Synchronizing package databases...
error: failed to synchronize all databases (no servers configured for repository)

I didn't do a partial upgrade, nor turned off my laptop while it was upgrading, nor (voluntarily) modified my pacman.conf. Here it is:
https://pastebin.com/gHg5pBtT

And here is /etc/pacman.d/mirrorlist:
https://pastebin.com/ScPmDenP

Also, there is no db.lck file in /var/lib/pacman. I can't find anything else online which might be linked to the issue. Any hint on how to solve this?
Title: Re: pacman -Syu fails to synchronize databases
Post by: Hitman on 02 March 2023, 00:01:09
Do you use Arch repos? If so, look in mirrorlist-arch, it has been overwritten by this update and by default all the servers are commented out.
Title: Re: pacman -Syu fails to synchronize databases
Post by: Coin on 02 March 2023, 01:59:14
Do you use Arch repos? If so, look in mirrorlist-arch, it has been overwritten by this update and by default all the servers are commented out.
Is there a script I could use to only pick the fastest mirrors or should I just uncomment all of them?
Title: Re: pacman -Syu fails to synchronize databases
Post by: tintin on 02 March 2023, 04:09:52
Is there a script I could use to only pick the fastest mirrors or should I just uncomment all of them?
I'm using XFCE and this script from a kind contributor to this forum :
Code: [Select]
#!/bin/bash
exec xfce4-terminal --maximize -H -x sh -c 'curl -s "https://archlinux.org/mirrorlist/?country=FR&country=DE&protocol=https&use_mirror_status=on" | sed -e 's/^#Server/Server/' -e '/^#/d' | rankmirrors -n 5 - > ~/mirrorlist-arch; sudo cp ~/mirrorlist-arch /etc/pacman.d/mirrorlist-arch; cat /etc/pacman.d/mirrorlist-arch; exec bash;'
 
## If needed, run first : sudo pacman -Sy pacman-contrib && sudo touch /etc/pacman.d/mirrorlist-arch
You must adapt this script to your desktop and the country in which you are located.
For example : you need to replace "country=FR&country=DE" by "country=US" if you are in the US.


Title: Re: pacman -Syu fails to synchronize databases
Post by: Dudemanguy on 02 March 2023, 04:12:52
Do you use Arch repos? If so, look in mirrorlist-arch, it has been overwritten by this update and by default all the servers are commented out.
Oops, that was my bad. I totally forgot that the script doesn't uncomment any mirrors and that you have to do it manually. That's just been corrected now. Obviously breaking this by default is not really intuitive.


Is there a script I could use to only pick the fastest mirrors or should I just uncomment all of them?
You can use rankmirrors.
Title: Re: pacman -Syu fails to synchronize databases
Post by: alaskajade on 02 March 2023, 04:56:28
Code: [Select]
:: Synchronizing package databases...
error: failed to synchronize all databases (no servers configured for repository)
had this happen to me.
the mirrorlist-arch file in /etc/pacman.d has been updated and has no servers uncommented. uncommenting a few servers had the sync run as usual.
Title: Re: pacman -Syu fails to synchronize databases
Post by: shako on 02 March 2023, 08:40:25
Thanks everyone for your replies. Now the problem is fixed. I manually solved it by uncommenting a few mirror entries in my /etc/pacman.d/mirrorlist-arch file, but after @Dudemanguy 's reply I assume a simple upgrade of mirrorlist-arch will fix everything by now. Marking as solved.