Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] pacman -Syu fails to synchronize databases (Read 7821 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[SOLVED] pacman -Syu fails to synchronize databases

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?

Re: pacman -Syu fails to synchronize databases

Reply #1
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.

Re: pacman -Syu fails to synchronize databases

Reply #2
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?

Re: pacman -Syu fails to synchronize databases

Reply #3
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.



Re: pacman -Syu fails to synchronize databases

Reply #4
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.

Re: pacman -Syu fails to synchronize databases

Reply #5
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.

Re: pacman -Syu fails to synchronize databases

Reply #6
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.