You are not logged in.

#1 2021-07-22 05:25:51

Zaxioms
Member
Registered: 2021-02-06
Posts: 6

Issue with databases

I was trying to do a system upgrade and I ran

sudo pacman -Syu

and was met with

: Synchronizing package databases...
 core                                                                625.8 KiB  2.66 MiB/s 00:00 [#########################################################] 100%
 extra                                                               625.8 KiB  6.11 MiB/s 00:00 [#########################################################] 100%
 community                                                           625.8 KiB  4.85 MiB/s 00:00 [#########################################################] 100%
:: Starting full system upgrade...
error: could not open file /var/lib/pacman/sync/core.db: Unrecognized archive format
error: could not open file /var/lib/pacman/sync/extra.db: Unrecognized archive format
error: could not open file /var/lib/pacman/sync/community.db: Unrecognized archive format

The only documented case I could find of this was here. but trying to run the solution

sudo pacman -Syyu

or

sudo pacman -Syu

does nothing to fix the issue. Does anyone have any other guesses?

Offline

#2 2021-07-22 06:16:01

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,275

Re: Issue with databases

try updating repo/mirrorlist at /etc/pacman.d/mirrorlist.


Arch is home!
cwm rofi weaver vifm vis lizzy pass terminator
https://github.com/Docbroke

Offline

#3 2021-07-22 06:19:52

Zaxioms
Member
Registered: 2021-02-06
Posts: 6

Re: Issue with databases

I tried that using https://archlinux.org/mirrorlist/all/ and uncommenting the worldwide and USA mirrors. No luck hmm

Offline

#4 2021-07-22 06:23:54

a821
Member
Registered: 2012-10-31
Posts: 269

Re: Issue with databases

"No luck" is not an error message. Try another mirror and post the full output of pacman with the --debug flag.

Offline

#5 2021-07-22 06:31:53

Zaxioms
Member
Registered: 2021-02-06
Posts: 6

Re: Issue with databases

Sorry sorry, It's just this over and over again
At the top I get

debug: config: SigLevel: Required
debug: config: SigLevel: DatabaseOptional
debug: config: LocalFileSigLevel: Optional
debug: config: new section 'core'
debug: config file /etc/pacman.conf, line 76: including /etc/pacman.d/mirrorlist
warning: config file /etc/pacman.d/mirrorlist, line 660: directive 'erver' in section 'core' not recognized.
debug: config: new section 'extra'
debug: config file /etc/pacman.conf, line 79: including /etc/pacman.d/mirrorlist
warning: config file /etc/pacman.d/mirrorlist, line 660: directive 'erver' in section 'extra' not recognized.
debug: config: new section 'community'
debug: config file /etc/pacman.conf, line 85: including /etc/pacman.d/mirrorlist
warning: config file /etc/pacman.d/mirrorlist, line 660: directive 'erver' in section 'community' not recognized.
debug: config: finished parsing /etc/pacman.conf
debug: setup_libalpm called
debug: option 'logfile' = /var/log/pacman.log
debug: option 'gpgdir' = /etc/pacman.d/gnupg/
debug: option 'hookdir' = /etc/pacman.d/hooks/
debug: option 'cachedir' = /var/cache/pacman/pkg/
debug: registering sync database 'core'
debug: database path for tree core set to /var/lib/pacman/sync/core.db
debug: "/var/lib/pacman/sync/core.db.sig" is not readable: No such file or directory
debug: sig path /var/lib/pacman/sync/core.db.sig could not be opened
debug: got error 43 at _alpm_gpgme_checksig (../lib/libalpm/signing.c: 593) : missing PGP signature
debug: missing optional signature
debug: setting usage of 15 for core repository
debug: adding new server URL to database 'core': http://mirrors.evowise.com/archlinux/core/os/x86_64
debug: adding new server URL to database 'core': http://mirror.rackspace.com/archlinux/core/os/x86_64
debug: adding new server URL to database 'core': https://mirror.rackspace.com/archlinux/core/os/x86_64
debug: adding new server URL to database 'core': http://mirrors.acm.wpi.edu/archlinux/core/os/x86_64
debug: adding new server URL to database 'core': http://mirrors.advancedhosters.com/archlinux/core/os/x86_64
debug: adding new server URL to database 'core': http://mirrors.aggregate.org/archlinux/core/os/x86_64
debug: adding new server URL to database 'core': http://ca.us.mirror.archlinux-br.org/core/os/x86_64
debug: adding new server URL to database 'core': http://il.us.mirror.archlinux-br.org/core/os/x86_64
debug: adding new server URL to database 'core': http://mirror.arizona.edu/archlinux/core/os/x86_64
debug: adding new server URL to database 'core': https://mirror.arizona.edu/archlinux/core/os/x86_64
debug: adding new server URL to database 'core': http://arlm.tyzoid.com/core/os/x86_64

and then a bunch of the "adding new server URL to database until:

debug: returning error 16 from _alpm_db_get_pkgcache_hash (../lib/libalpm/db.c: 521) : invalid or corrupted database
debug: searching for replacements for zita-resampler in extra
debug: returning error 16 from _alpm_db_get_pkgcache_hash (../lib/libalpm/db.c: 521) : invalid or corrupted database
debug: returning error 16 from _alpm_db_get_pkgcache_hash (../lib/libalpm/db.c: 521) : invalid or corrupted database
debug: searching for replacements for zita-resampler in community
debug: returning error 16 from _alpm_db_get_pkgcache_hash (../lib/libalpm/db.c: 521) : invalid or corrupted database
debug: returning error 16 from _alpm_db_get_pkgcache_hash (../lib/libalpm/db.c: 521) : invalid or corrupted database
debug: searching for replacements for zlib in core
debug: returning error 16 from _alpm_db_get_pkgcache_hash (../lib/libalpm/db.c: 521) : invalid or corrupted database
debug: returning error 16 from _alpm_db_get_pkgcache_hash (../lib/libalpm/db.c: 521) : invalid or corrupted database
debug: searching for replacements for zlib in extra
debug: returning error 16 from _alpm_db_get_pkgcache_hash (../lib/libalpm/db.c: 521) : invalid or corrupted database
debug: returning error 16 from _alpm_db_get_pkgcache_hash (../lib/libalpm/db.c: 521) : invalid or corrupted database
debug: searching for replacements for zlib in community
debug: returning error 16 from _alpm_db_get_pkgcache_hash (../lib/libalpm/db.c: 521) : invalid or corrupted database
debug: returning error 16 from _alpm_db_get_pkgcache_hash (../lib/libalpm/db.c: 521) : invalid or corrupted database
debug: searching for replacements for zsh in core
debug: returning error 16 from _alpm_db_get_pkgcache_hash (../lib/libalpm/db.c: 521) : invalid or corrupted database
debug: returning error 16 from _alpm_db_get_pkgcache_hash (../lib/libalpm/db.c: 521) : invalid or corrupted database
debug: searching for replacements for zsh in extra
debug: returning error 16 from _alpm_db_get_pkgcache_hash (../lib/libalpm/db.c: 521) : invalid or corrupted database
debug: returning error 16 from _alpm_db_get_pkgcache_hash (../lib/libalpm/db.c: 521) : invalid or corrupted database
debug: searching for replacements for zsh in community
debug: returning error 16 from _alpm_db_get_pkgcache_hash (../lib/libalpm/db.c: 521) : invalid or corrupted database
debug: returning error 16 from _alpm_db_get_pkgcache_hash (../lib/libalpm/db.c: 521) : invalid or corrupted database
debug: searching for replacements for zstd in core
debug: returning error 16 from _alpm_db_get_pkgcache_hash (../lib/libalpm/db.c: 521) : invalid or corrupted database
debug: returning error 16 from _alpm_db_get_pkgcache_hash (../lib/libalpm/db.c: 521) : invalid or corrupted database
debug: searching for replacements for zstd in extra
debug: returning error 16 from _alpm_db_get_pkgcache_hash (../lib/libalpm/db.c: 521) : invalid or corrupted database
debug: returning error 16 from _alpm_db_get_pkgcache_hash (../lib/libalpm/db.c: 521) : invalid or corrupted database
debug: searching for replacements for zstd in community
debug: returning error 16 from _alpm_db_get_pkgcache_hash (../lib/libalpm/db.c: 521) : invalid or corrupted database
debug: returning error 16 from _alpm_db_get_pkgcache_hash (../lib/libalpm/db.c: 521) : invalid or corrupted database
 there is nothing to do
debug: unregistering database 'local'
debug: freeing package cache for repository 'local'
debug: unregistering database 'core'
debug: unregistering database 'extra'
debug: unregistering database 'community'

Last edited by Zaxioms (2021-07-22 06:34:26)

Offline

#6 2021-07-22 06:36:57

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 29,502
Website

Re: Issue with databases

warning: config file /etc/pacman.d/mirrorlist, line 660: directive 'erver' in section 'core' not recognized.

Fix your typo.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Online

#7 2021-07-22 06:42:05

a821
Member
Registered: 2012-10-31
Posts: 269

Re: Issue with databases

your first mirror is broken "http://mirrors.evowise.com/archlinux/core/os/x86_64"

Edit: check your mirrors status https://archlinux.org/mirrors/status/

Last edited by a821 (2021-07-22 06:44:53)

Offline

#8 2021-07-22 06:45:44

Zaxioms
Member
Registered: 2021-02-06
Posts: 6

Re: Issue with databases

I fixed the typo and commented the worldwide servers and that seems to have fixed it! I'm not sure why it would fix it though...

Offline

#9 2021-07-22 11:21:29

loqs
Member
Registered: 2014-03-06
Posts: 13,701

Re: Issue with databases

Zaxioms wrote:

I'm not sure why it would fix it though...

http://mirrors.evowise.com/archlinux/co … 64/core.db is returning a web page not the expected package database.  Same for extra and community.
Which explains the 'Unrecognised archive format' errors and why switching primary mirror resolved the issue.

Offline

#10 2021-07-22 18:52:05

Kilobit
Member
Registered: 2021-07-22
Posts: 1

Re: Issue with databases

loqs wrote:
Zaxioms wrote:

I'm not sure why it would fix it though...

http://mirrors.evowise.com/archlinux/co … 64/core.db is returning a web page not the expected package database.  Same for extra and community.
Which explains the 'Unrecognised archive format' errors and why switching primary mirror resolved the issue.

I figured this out as well, after trying the regular stuff like 'pacman -Syyu' but then noticed the database files were exactly the same.

Which raises the question: is there any mechanism in place against hijacking / misconfiguration of the all-important package databases? Or perhaps plans for a feature to pacman to fallback to another mirror. As that site does not return a 404 error (as it should have!) pacman happily accepted HTML garbage for its database...

Offline

#12 2021-07-22 22:16:50

loqs
Member
Registered: 2014-03-06
Posts: 13,701

Re: Issue with databases

Kilobit wrote:

Which raises the question: is there any mechanism in place against hijacking / misconfiguration of the all-important package databases?

pacman does support database signing.  I believe there are unresolved details related to the signing process preventing implementation.
As packages are signed pacman will only accept a newer signed package from a compromised mirror.  The allow downgrades option in `pacman -Syuu` would also allow older signed packages.

Offline

Board footer

Powered by FluxBB