You are not logged in.

#1 2021-07-25 15:40:13

merith-tk
Member
Registered: 2020-06-25
Posts: 4

could not open file /var/lib/pacman/sync/core.db: Unrecognized archive

I was going about my business, updating one of my private servers, and I encounter these severe issues
https://i.imgur.com/ISFR6DI.png

[dae@wg sync]$ sudo pacman -Syu
:: Synchronizing package databases...
core                                        614.0 KiB   865 KiB/s 00:01 [########################################] 100%
extra                                       614.0 KiB  1462 KiB/s 00:00 [########################################] 100%
community                              614.0 KiB  2.07 MiB/s 00:00 [########################################] 100%
multilib                                    614.0 KiB  2047 KiB/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
error: could not open file /var/lib/pacman/sync/multilib.db: Unrecognized archive format
there is nothing to do

I am unable to use anything from the core repositories, and it thinks that Core Repo packages (such as xfce4, linux, base, base-devel, gcc) are all AUR packages with missing entries on the AUR

https://i.imgur.com/lzqEzw5.png


[dae@wg sync]$ pacman --version

.--.                  Pacman v6.0.0 - libalpm v13.0.0
/ _.-' .-.  .-.  .-.   Copyright (C) 2006-2021 Pacman Development Team
\  '-. '-'  '-'  '-'   Copyright (C) 2002-2006 Judd Vinet
'--'
                       This program may be freely redistributed under
                       the terms of the GNU General Public License.

Last edited by merith-tk (2021-07-25 15:46:40)

Offline

#2 2021-07-25 15:53:11

seth
Member
Registered: 2012-09-03
Posts: 25,071

Re: could not open file /var/lib/pacman/sync/core.db: Unrecognized archive

file /var/lib/pacman/sync/core.db

It's likely a captive portal, some not-404 page or else.
In that case try

sudo pacman -Syyu

Offline

#3 2021-07-25 16:04:35

merith-tk
Member
Registered: 2020-06-25
Posts: 4

Re: could not open file /var/lib/pacman/sync/core.db: Unrecognized archive

[dae@wg ~]$ file /var/lib/pacman/sync/core.db
/var/lib/pacman/sync/core.db: HTML document, ASCII text, with very long lines (65536), with no line terminators

Downloaded it locally, renamed it to html and opened it in my browser..
https://i.imgur.com/0dS2iQA.png

it appears one of the mirrors has been hijacked

Offline

#4 2021-07-25 16:11:38

papajoke
Member
From: france
Registered: 2014-10-10
Posts: 29
Website

Re: could not open file /var/lib/pacman/sync/core.db: Unrecognized archive


lts - zsh - Kde - Intel Core i3 - 6Go RAM - GeForce 405 video-nouveau

Offline

#5 2021-07-25 16:14:23

merith-tk
Member
Registered: 2020-06-25
Posts: 4

Re: could not open file /var/lib/pacman/sync/core.db: Unrecognized archive

I had to regenerate my mirrorlist from
https://archlinux.org/mirrorlist/?count … _status=on

and then
sed -i "s/#Serv/Serv/" mirrorlist

and now it actually works

Offline

#6 2021-07-25 16:46:23

seth
Member
Registered: 2012-09-03
Posts: 25,071

Re: could not open file /var/lib/pacman/sync/core.db: Unrecognized archive

https://archlinux.org/packages/community/any/reflector/

Edit: 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.

Last edited by seth (2021-07-25 16:46:43)

Offline

#7 2021-07-29 17:43:28

qu@rk
Member
Registered: 2021-07-28
Posts: 25

Re: could not open file /var/lib/pacman/sync/core.db: Unrecognized archive

I figured out why I kept getting Unrecognized archive format, maybe this will help others:

timedatectl set-ntp true

make sure the time is synchronized

edit: nope, still get them. this is strange. worked while installing, after booting I get the same issue. and worked once after booting, but now I keep getting the error. deleted the db files, tried -Scc, nothing.

2nd edit: I deleted everything in /etc/pacman.d/mirrorlist and kept only one server from my country. now seems to work fine. seems it autoselects some server that doesn't play nice or something.

Last edited by qu@rk (2021-07-29 18:03:50)

Offline

#8 2021-07-29 19:13:02

seth
Member
Registered: 2012-09-03
Posts: 25,071

Re: could not open file /var/lib/pacman/sync/core.db: Unrecognized archive

seems it autoselects some server that doesn't play nice or something.

Do you use reflector to build the mirrorlist?

Offline

#9 2021-07-29 21:01:10

qu@rk
Member
Registered: 2021-07-28
Posts: 25

Re: could not open file /var/lib/pacman/sync/core.db: Unrecognized archive

Don't know what that is, I just followed the wiki install guide. I'm new to Arch, but I like it!

Offline

#10 2021-07-29 21:08:22

seth
Member
Registered: 2012-09-03
Posts: 25,071

Re: could not open file /var/lib/pacman/sync/core.db: Unrecognized archive

Offline

#11 2021-07-29 21:21:58

loqs
Member
Registered: 2014-03-06
Posts: 14,273

Re: could not open file /var/lib/pacman/sync/core.db: Unrecognized archive

seth possibly automatic use of reflector by the install media https://gitlab.archlinux.org/archlinux/ … rget.wants
followed by pacstrap copying that mirrorlist to the install unless -M was used.

Offline

#12 2021-07-29 21:38:30

seth
Member
Registered: 2012-09-03
Posts: 25,071

Re: could not open file /var/lib/pacman/sync/core.db: Unrecognized archive

I just meant to use it to get to a non-broken mirror list.
Because

I deleted everything in /etc/pacman.d/mirrorlist and kept only one server from my country. now seems to work fine. seems it autoselects some server that doesn't play nice or something.

Don't know what that is

likely means that he had a garbage mirror there, either dated or bad hand-pick.

Offline

#13 2021-07-29 22:37:15

qu@rk
Member
Registered: 2021-07-28
Posts: 25

Re: could not open file /var/lib/pacman/sync/core.db: Unrecognized archive

I'll check out that link, thanks!
you have exactly 22222 posts atm.

Offline

#14 2021-07-29 22:55:39

qu@rk
Member
Registered: 2021-07-28
Posts: 25

Re: could not open file /var/lib/pacman/sync/core.db: Unrecognized archive

So, default install usb media made from the image on the website. Boot in it, first command is pacman -Syy, finishes ok. Next pacman -Syu and I get the previously mentioned error. Comes and goes, if I insist with pacman -Syu it eventually works. I ran reflector and I get a scrolling list of all the servers. I ran it and after it again pacman -Syu fails with the db error. But it's strange, if I run it (pacman) a few times it works. I have a HP Pavilion g6. Last night worked fine, today I ran into this type of error.
Since it's working, sort of, I'll continue working on the build atm.

Last edited by qu@rk (2021-07-29 22:56:13)

Offline

#15 2021-08-01 11:55:41

qu@rk
Member
Registered: 2021-07-28
Posts: 25

Re: could not open file /var/lib/pacman/sync/core.db: Unrecognized archive

yes seems that correctly running reflector always solves this issue for me.

Offline

#16 2021-08-10 07:13:13

cick0
Member
Registered: 2020-06-08
Posts: 2

Re: could not open file /var/lib/pacman/sync/core.db: Unrecognized archive

I noticed a mirrorlist.pacnew file in /etc/pacman.d, meaning the mirror list was not updated. Replaced the mirrorlist with that file and the issue is fixed.

Offline

Board footer

Powered by FluxBB