You are not logged in.

#1 2009-04-16 13:47:02

PapaNappa
Member
Registered: 2009-04-16
Posts: 7

Pacman: failed to synchronize any databases (unexpected error)

Hi!

It seems my pacman is broken. When I do $ sudo pacman -Sy it says:

:: Synchronizing package databases...
error: failed to update core (unexpected error)
error: failed to update extra (unexpected error)
error: failed to update community (unexpected error)
error: failed to synchronize any databases

With --debug:

debug: config: attempting to read file /etc/pacman.conf
debug: config: new section 'options'
debug: config: HoldPkg: pacman
debug: config: HoldPkg: glibc
debug: config: SyncFirst: pacman
debug: config: new section 'core'
debug: setlibpaths() called
debug: option 'cachedir' = /var/cache/pacman/pkg/
debug: registering sync database 'core'
debug: opening database 'core'
debug: opening database from path '/var/lib/pacman/sync/core/'
debug: config: including /etc/pacman.d/mirrorlist
debug: config: attempting to read file /etc/pacman.d/mirrorlist
debug: config: finished parsing /etc/pacman.d/mirrorlist
debug: config: new section 'extra'
debug: registering sync database 'extra'
debug: opening database 'extra'
debug: opening database from path '/var/lib/pacman/sync/extra/'
debug: config: including /etc/pacman.d/mirrorlist
debug: config: attempting to read file /etc/pacman.d/mirrorlist
debug: config: finished parsing /etc/pacman.d/mirrorlist
debug: config: new section 'community'
debug: registering sync database 'community'
debug: opening database 'community'
debug: opening database from path '/var/lib/pacman/sync/community/'
debug: config: including /etc/pacman.d/mirrorlist
debug: config: attempting to read file /etc/pacman.d/mirrorlist
debug: config: finished parsing /etc/pacman.d/mirrorlist
debug: config: finished parsing /etc/pacman.conf
debug: registering local database
debug: opening database 'local'
debug: opening database from path '/var/lib/pacman/local/'
:: Synchronizing package databases...
debug: failed to sync db: unexpected error
error: failed to update core (unexpected error)
debug: failed to sync db: unexpected error
error: failed to update extra (unexpected error)
debug: failed to sync db: unexpected error
error: failed to update community (unexpected error)
error: failed to synchronize any databases
debug: closing database 'local'
debug: unregistering database 'local'
debug: closing database 'core'
debug: unregistering database 'core'
debug: closing database 'extra'
debug: unregistering database 'extra'
debug: closing database 'community'
debug: unregistering database 'community'

And installing any packages result in:

Proceed with installation? [Y/n] 
debug: using cachedir: /var/cache/pacman/pkg/
:: Retrieving packages from extra...
warning: failed to retrieve some files from extra
error: failed to commit transaction (unexpected error)
Errors occurred, no packages were upgraded.
debug: closing database 'local'
debug: unregistering database 'local'
debug: freeing package cache for repository 'local'
debug: closing database 'core'
debug: unregistering database 'core'
debug: freeing package cache for repository 'core'
debug: closing database 'extra'
debug: unregistering database 'extra'
debug: freeing package cache for repository 'extra'
debug: closing database 'community'
debug: unregistering database 'community'

So what is wrong? Is there a solution?

EDIT:

Problem solved. There were no uncommented lines in /etc/pacman.d/mirrorlist. I just uncommented some and now it works.
But how can it happen that there are suddenly no mirrors activated?

Last edited by PapaNappa (2009-04-16 13:51:36)

Offline

#2 2009-04-16 14:09:23

SanskritFritz
Member
From: Budapest, Hungary
Registered: 2009-01-08
Posts: 1,923
Website

Re: Pacman: failed to synchronize any databases (unexpected error)

If you post your pacman.conf, we might be able to help you.


zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)

Offline

#3 2009-04-16 14:21:03

PapaNappa
Member
Registered: 2009-04-16
Posts: 7

Re: Pacman: failed to synchronize any databases (unexpected error)

Here is it, I never touched this file

#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives

#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir     = /
#DBPath      = /var/lib/pacman/
#CacheDir    = /var/cache/pacman/pkg/
#LogFile     = /var/log/pacman.log
HoldPkg     = pacman glibc
# If upgrades are available for these packages they will be asked for first
SyncFirst   = pacman
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#XferCommand = /usr/bin/curl %u > %o
#CleanMethod = KeepInstalled

# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg   =
#IgnoreGroup =

#NoUpgrade   =
#NoExtract   =

# Misc options (all disabled by default)
#NoPassiveFtp
#UseSyslog
#ShowSize
#UseDelta
#TotalDownload

#
# REPOSITORIES
#   - can be defined here or included from another file
#   - pacman will search repositories in the order defined here
#   - local/custom mirrors can be added here or in separate files
#   - repositories listed first will take precedence when packages
#     have identical names, regardless of version number
#   - URLs will have $repo replaced by the name of the current repo
#
# Repository entries are of the format:
#       [repo-name]
#       Server = ServerName
#       Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#

# Testing is disabled by default.  To enable, uncomment the following
# two lines.  You can add preferred servers immediately after the header,
# and they will be used before the default mirrors.
#[testing]
#Include = /etc/pacman.d/mirrorlist

[core]
# Add your preferred servers here, they will be used first
Include = /etc/pacman.d/mirrorlist

[extra]
# Add your preferred servers here, they will be used first
Include = /etc/pacman.d/mirrorlist

[community]
# Add your preferred servers here, they will be used first
Include = /etc/pacman.d/mirrorlist

# An example of a custom package repository.  See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#Server = file:///home/custompkgs

Offline

#4 2009-04-16 14:30:28

kgas
Member
From: Qatar
Registered: 2008-11-08
Posts: 718

Re: Pacman: failed to synchronize any databases (unexpected error)

Try some other mirrors and may solve this issue.

Offline

#5 2009-04-16 14:31:13

SanskritFritz
Member
From: Budapest, Hungary
Registered: 2009-01-08
Posts: 1,923
Website

Re: Pacman: failed to synchronize any databases (unexpected error)

What is in your /etc/pacman.d/mirrorlist ?


zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)

Offline

#6 2009-04-16 15:15:47

PapaNappa
Member
Registered: 2009-04-16
Posts: 7

Re: Pacman: failed to synchronize any databases (unexpected error)

Uhm, you  may have not noticed it, but:

EDIT:

Problem solved. There were no uncommented lines in /etc/pacman.d/mirrorlist. I just uncommented some and now it works.
But how can it happen that there are suddenly no mirrors activated?

Offline

#7 2009-04-16 17:09:16

SanskritFritz
Member
From: Budapest, Hungary
Registered: 2009-01-08
Posts: 1,923
Website

Re: Pacman: failed to synchronize any databases (unexpected error)

Well, at the end you had a question, I thought, you might want to get an answer.


zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)

Offline

#8 2009-04-16 18:59:17

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Pacman: failed to synchronize any databases (unexpected error)

PapaNappa wrote:

Uhm, you  may have not noticed it, but:

EDIT:

Problem solved. There were no uncommented lines in /etc/pacman.d/mirrorlist. I just uncommented some and now it works.
But how can it happen that there are suddenly no mirrors activated?

We want to force users to uncomment the appropriate mirrors for their location instead of just using  the first one on the list by default.

Offline

#9 2009-04-16 19:29:17

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: Pacman: failed to synchronize any databases (unexpected error)

As Snowman mentioned; the syntax of the default mirrorlist went from all UNcommented by default to all commented by default.  this was a welcome change to many; myself included.  however b/c of the way pacman handles configs, if you never touched your default UNcommented mirrorlist it was silently overwritten with the fully commented version.  seems to have caught more than a few ppl by surprise.  if you had touched your original mirrorlist at all since your original install you would've gotten a mirrorlist.pacnew file as i did.

Offline

#10 2009-04-17 11:38:38

PapaNappa
Member
Registered: 2009-04-16
Posts: 7

Re: Pacman: failed to synchronize any databases (unexpected error)

Ok, I see the problem now. Thanks for that.
But shouldn't be in that case some kind of message, so the user really knows that he has to change the mirrorlist? Just as an option to think of for other updates like that.

Offline

#11 2009-04-29 02:13:49

Youdaman
Member
From: Sydney, Australia
Registered: 2006-01-14
Posts: 41

Re: Pacman: failed to synchronize any databases (unexpected error)

PapaNappa wrote:

Ok, I see the problem now. Thanks for that.
But shouldn't be in that case some kind of message, so the user really knows that he has to change the mirrorlist? Just as an option to think of for other updates like that.

+1

I googled and found this thread and things worked once I uncommented some mirrors in /etc/pacman.d/mirrorlist as suggested! Thanks for this "documentation" wink

Offline

#12 2009-04-29 16:39:18

soundwave
Member
Registered: 2007-05-25
Posts: 11

Re: Pacman: failed to synchronize any databases (unexpected error)

I also +1 this post.

Thanks to google I found this post.

The only question remaining is should I uncomment all of the servers? or should I just pick a few.. Reason being does it parse down the list from top to bottom and use the first one it finds?

Offline

#13 2009-04-29 16:58:33

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: Pacman: failed to synchronize any databases (unexpected error)

i believe it parses top to bottom, and a default pacman.conf will use one mirror at a time.  personally i uncomment all mirrors in the geographic region nearest to me.  if you use a command like aria2c which uses multiple connections i believe its recommended to not uncomment more than 10.  also it's recommended to not uncomment the official archlinux.org mirror as that's throttled.  however, i'm looking now and i don't see that one listed in my mirrorlist; either i'm blind or it's been removed by default.

Offline

#14 2009-07-27 13:58:29

sml
Member
Registered: 2005-05-21
Posts: 89

Re: Pacman: failed to synchronize any databases (unexpected error)

Hmmm .. this one also caught me out.

Lucky this thread is around.

Offline

#15 2020-03-22 03:22:59

lint777
Member
Registered: 2020-03-21
Posts: 1

Re: Pacman: failed to synchronize any databases (unexpected error)

I have the same problem. Everything in my mirror list is uncommented though I never touched it. What could be the problem?

Last edited by lint777 (2020-03-22 03:37:07)

Offline

#16 2020-03-22 03:55:07

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,089
Website

Re: Pacman: failed to synchronize any databases (unexpected error)

lint777,

When you signed up for this website, you agreed to the Code of Conduct. One piece of that CoC mentions that you should not necrobump old threads (as their problems likely do not relate). Please read the code of conduct in full before posting again.

Closed.

All the best,

-HG

Offline

Board footer

Powered by FluxBB