Failed pacman System update - Alpm

Hello,
i just tryed to update my system and got this error after initialize the “eos-update --aur”.

Fehler: Alpm-Bibliothek konnte nicht initialisiert werden:
(root: /, dbpath: /var/lib/pacman/)
Konnte Verzeichnis nicht finden oder lesen

(sorry for the german output)

I also tryed “pacman -Sy --debug” with this output:

debug: pacman v6.1.0 - libalpm v14.0.0
debug: config: attempting to read file /etc/pacman.conf
debug: config: new section 'options'
debug: config: HoldPkg: pacman
debug: config: HoldPkg: glibc
debug: config: Architecture: auto
debug: config: arch: x86_64
debug: config: chomp
debug: config: verbosepkglists
debug: config: SigLevel: Required
debug: config: SigLevel: DatabaseOptional
debug: config: LocalFileSigLevel: Optional
debug: config: new section 'endeavouros'
debug: config: SigLevel: PackageRequired
debug: config file /etc/pacman.conf, line 77: including /etc/pacman.d/endeavouros-mirrorlist
debug: config: new section 'core'
debug: config file /etc/pacman.conf, line 83: including /etc/pacman.d/mirrorlist
debug: config: new section 'extra'
debug: config file /etc/pacman.conf, line 86: including /etc/pacman.d/mirrorlist
debug: config: new section 'community'
debug: config file /etc/pacman.conf, line 92: including /etc/pacman.d/mirrorlist
debug: config: new section 'multilib-testing'
debug: config file /etc/pacman.conf, line 98: including /etc/pacman.d/mirrorlist
debug: config: new section 'multilib'
debug: config file /etc/pacman.conf, line 101: including /etc/pacman.d/mirrorlist
��Uug: config: finished parsing �
debug: setup_libalpm called
Fehler: Alpm-Bibliothek konnte nicht initialisiert werden:
(root: /, dbpath: /var/lib/pacman/)
Konnte Verzeichnis nicht finden oder lesen

Can someone help me out?

1 Like

What is the output of:

ls -al /var/lib/pacman

ls -al /var/lib/pacman/local/ALPM_DB_VERSION

cat /etc/pacman.conf

?

Hi,

ls -al /var/lib/pacman says:

ls: Zugriff auf '/var/lib/pacman' nicht möglich: Datei oder Verzeichnis nicht gefunden

(no file or directory found)

ls -al /var/lib/pacman/local/ALPM_DB_VERSION

ls: Zugriff auf '/var/lib/pacman/local/ALPM_DB_VERSION' nicht möglich: Datei oder Verzeichnis nicht gefunden

(also no file or directory found)

cat /etc/pacman.conf

#
# /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
#GPGDir      = /etc/pacman.d/gnupg/
#HookDir     = /etc/pacman.d/hooks/
HoldPkg     = pacman glibc
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
#UseDelta    = 0.7
Architecture = auto

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

#NoUpgrade   =
#NoExtract   =

# Misc options
#UseSyslog
Color
ILoveCandy
#NoProgressBar
#CheckSpace
VerbosePkgLists
DisableDownloadTimeout
ParallelDownloads = 5

# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel    = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required

# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Arch Linux
# packagers with `pacman-key --populate archlinux`.

#
# 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
#   - URLs will have $arch replaced by the name of the architecture
#
# 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.
#

# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.

[endeavouros]
SigLevel = PackageRequired
Include = /etc/pacman.d/endeavouros-mirrorlist

#[testing]
#Include = /etc/pacman.d/mirrorlist

[core]
Include = /etc/pacman.d/mirrorlist

[extra]
Include = /etc/pacman.d/mirrorlist

#[community-testing]
#Include = /etc/pacman.d/mirrorlist

[community]
Include = /etc/pacman.d/mirrorlist

# If you want to run 32 bit applications on your x86_64 system,
# enable the multilib repositories as required here.

[multilib-testing]
Include = /etc/pacman.d/mirrorlist

[multilib]
Include = /etc/pacman.d/mirrorlist

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

Remove those lines, they are no more used.

Then run

sudo pacman -S pacman

and if that works, run

sudo pacman -Syu

Looks like your sync and local databases are gone :thinking:

The sync databases can get recreated easily but the local database which contains information about the packages installed in your system is more problematic.

The only thing I could think of is following the instructions described in the link below to restore your local database: https://wiki.archlinux.org/title/Pacman/Restore_local_database

Also, why would you need to enable multilib-testing repsitory ?

1 Like

I just saw that i have only a pacman.backup in the var/lib/ directory.
It contains a “local” and “sync” folder with files and zips.
Ist there a way i can restore it…maybe just rename the folder?

sudo pacman -S pacman

get the same error as in my first post

Maybe you have some unsupported program managing packages?
You could try simply creating folder

sudo mkdir /var/lib/pacman

and then run

eos-update

I tryed and can initialize an system update. But the system tells me that there is nothing to do… What i doubt, because i dont used the laptop for more than 4 weeks.

:: Paketdatenbanken werden synchronisiert …
 endeavouros ist aktuell
 core ist aktuell
 extra ist aktuell
 community ist aktuell
 multilib-testing ist aktuell
 multilib ist aktuell
:: Durchsuche AUR nach Updates...
:: Durchsuche Datenbanken nach Updates...
 es gibt nichts zu tun

Drücke ENTER um dieses Fenster zu schließen: 


Rename /var/lib/pacman.backup to /var/lib/pacman and if you are lucky that your local database is intact then your pacman should work as intended:

sudo pacman -Syu

That is because you are still lacking the local database in /var/lib/pacman.

That sounds like a mirrorlist problem.
You can try what @pebcak suggested. If that fails, try updating the Arch mirrors with the Welcome app.

I tryed to rename via

mv pacman.backup pacman

in the var/lib/ direcory. But it doesnt work. Can you tell me the command to rename a directory please?

Do you already have a /var/lib/pacman directory?

If you do (I guess you do since you ran a mkdir command before), run:

sudo cp -r /var/lib/pacman.backup/* /var/lib/pacman/

to copy the content of pacman.backup to pacman.

Then run: sudo pacman -Syu

Ok one step further…
sudo pacman -Syu

: Paketdatenbanken werden synchronisiert …
 endeavouros ist aktuell
 core ist aktuell
 extra ist aktuell
 community ist aktuell
 multilib-testing ist aktuell
 multilib ist aktuell
Fehler: Konnte Datei 'endeavouros.db' nicht von mirror.moson.org übertragen : Resolving timed out after 10000 milliseconds
:: Vollständige Systemaktualisierung wird gestartet …
:: dbus-python durch extra/python-dbus ersetzen? [J/n] j
Abhängigkeiten werden aufgelöst …
Warnung: Kann "libcap=2.70" nicht auflösen (eine Abhängigkeit von "lib32-libcap")
Warnung: Kann "libcap=2.70" nicht auflösen (eine Abhängigkeit von "lib32-libcap")
:: Das folgende Paket kann aufgrund nicht auflösbarer Abhängigkeiten nicht aktualisiert werden:
      lib32-libcap

:: Möchten Sie das oben genannte Paket bei dieser Aktualisierung überspringen? [j/N] j
Nach in Konflikt stehenden Paketen wird gesucht …
Fehler: Vorgang konnte nicht vorbereitet werden (Kann Abhängigkeiten nicht erfüllen)
:: Installation von icu (75.1-1) verletzt Abhängigkeit »libicui18n.so=74-64«, benötigt von electron25
:: Installation von icu (75.1-1) verletzt Abhängigkeit »libicuuc.so=74-64«, benötigt von electron25

Could you run this:

LANG=C sudo pacman -Syu and post the output in English?

1 Like

Can you show the contents of the mirrorlists:

cat /etc/pacman.d/endeavouros-mirrorlist | eos-sendlog
cat /etc/pacman.d/mirrorlist | eos-sendlog
:: Synchronizing package databases...
 endeavouros is up to date
 core is up to date
 extra is up to date
 community is up to date
 multilib-testing is up to date
 multilib is up to date
error: failed retrieving file 'core.db' from arch.phinau.de : Failed to connect to arch.phinau.de port 443 after 10002 ms: Timeout was reached
error: failed retrieving file 'extra.db' from arch.phinau.de : Failed to connect to arch.phinau.de port 443 after 10002 ms: Timeout was reached
error: failed retrieving file 'community.db' from arch.phinau.de : Failed to connect to arch.phinau.de port 443 after 10002 ms: Timeout was reached
warning: too many errors from arch.phinau.de, skipping for the remainder of this transaction
error: failed retrieving file 'multilib-testing.db' from arch.phinau.de : Failed to connect to arch.phinau.de port 443 after 10002 ms: Timeout was reached
error: failed retrieving file 'multilib.db' from arch.phinau.de : Failed to connect to arch.phinau.de port 443 after 10000 ms: Timeout was reached
:: Starting full system upgrade...
:: Replace dbus-python with extra/python-dbus? [Y/n] n
resolving dependencies...
warning: cannot resolve "libcap=2.70", a dependency of "lib32-libcap"
warning: cannot resolve "libcap=2.70", a dependency of "lib32-libcap"
:: The following package cannot be upgraded due to unresolvable dependencies:
      lib32-libcap

:: Do you want to skip the above package for this upgrade? [y/N] n
error: failed to prepare transaction (could not satisfy dependencies)
:: unable to satisfy dependency 'libcap=2.70' required by lib32-libcap
:: unable to satisfy dependency 'libcap=2.70' required by lib32-libcap

Refresh your mirrorlist:

reflector --latest 7 --sort rate --protocol https | sudo tee /etc/pacman.d/mirrorlist

Then run again:

LANG=C sudo pacman -Syyu

cat /etc/pacman.d/endeavouros-mirrorlist | eos-sendlog

######################################################
####                                              ####
###        EndeavourOS Repository Mirrorlist       ###
####                                              ####
######################################################
#### Entry in file /etc/pacman.conf:
###     [endeavouros]
###     SigLevel = PackageRequired
###     Include = /etc/pacman.d/endeavouros-mirrorlist
######################################################
### Tip: Use the 'eos-rankmirrors' program to rank
###      these mirrors or re-order them manually.
######################################################

## Canada
#Server = https://ca.gate.endeavouros.com/endeavouros/repo/$repo/$arch

## China
#Server = https://mirrors.tuna.tsinghua.edu.cn/endeavouros/repo/$repo/$arch

## Germany
#Server = https://mirror.alpix.eu/endeavouros/repo/$repo/$arch
#Server = https://de.freedif.org/EndeavourOS/repo/$repo/$arch
#Server = https://mirror.moson.org/endeavouros/repo/$repo/$arch

## France
#Server = https://endeavour.remi.lu/repo/$repo/$arch
#Server = https://mirror.jordanrey.me/endeavouros/repo/$repo/$arch

## Singapore
#Server = https://mirror.jingk.ai/endeavouros/repo/$repo/$arch
#Server = https://mirror.freedif.org/EndeavourOS/repo/$repo/$arch

## South Korea
#Server = https://mirror.funami.tech/endeavouros/repo/$repo/$arch

## Sweden
#Server = https://ftp.acc.umu.se/mirror/endeavouros/repo/$repo/$arch
#Server = https://mirror.linux.pizza/endeavouros/repo/$repo/$arch

## Taiwan
#Server = https://mirror.archlinux.tw/EndeavourOS/repo/$repo/$arch

## Ukraine
#Server = https://fastmirror.pp.ua/endeavouros/repo/$repo/$arch


# Results of mirror ranking at (UTC) 14.02.2023 20:27:15:
# The following fields are shown for each mirror:
#   mirror:          The mirror address
#   update-level:    Ordinal number of the latest update (larger is newer)
#   fetch-time:      Measures the speed of the mirror (smaller is faster)
#
# mirror                                                             update-level  fetch-time
# ~~~~~~                                                             ~~~~~~~~~~~~  ~~~~~~~~~~
# https://mirror.moson.org/endeavouros/repo/$repo/$arch              1790          0.222726
# https://de.freedif.org/EndeavourOS/repo/$repo/$arch                1790          0.256557
# https://endeavour.remi.lu/repo/$repo/$arch                         1790          0.308685
# https://mirror.linux.pizza/endeavouros/repo/$repo/$arch            1790          0.338460
# https://mirror.jordanrey.me/endeavouros/repo/$repo/$arch           1790          0.357561
# https://mirror.alpix.eu/endeavouros/repo/$repo/$arch               1790          0.360983
# https://ftp.acc.umu.se/mirror/endeavouros/repo/$repo/$arch         1790          0.364843
# https://ca.gate.endeavouros.com/endeavouros/repo/$repo/$arch       1790          0.523974
# https://mirror.freedif.org/EndeavourOS/repo/$repo/$arch            1790          0.779228
# https://mirror.jingk.ai/endeavouros/repo/$repo/$arch               1790          0.798493
# https://mirror.funami.tech/endeavouros/repo/$repo/$arch            1790          0.994965
# https://mirrors.tuna.tsinghua.edu.cn/endeavouros/repo/$repo/$arch  1790          1.217789
# https://mirror.archlinux.tw/EndeavourOS/repo/$repo/$arch           1790          1.308728
# https://fastmirror.pp.ua/endeavouros/repo/$repo/$arch              1790          1.972272

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# EndeavourOS mirrorlist:
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Server = https://mirror.moson.org/endeavouros/repo/$repo/$arch
Server = https://de.freedif.org/EndeavourOS/repo/$repo/$arch
Server = https://endeavour.remi.lu/repo/$repo/$arch
Server = https://mirror.linux.pizza/endeavouros/repo/$repo/$arch
Server = https://mirror.jordanrey.me/endeavouros/repo/$repo/$arch
Server = https://mirror.alpix.eu/endeavouros/repo/$repo/$arch
Server = https://ftp.acc.umu.se/mirror/endeavouros/repo/$repo/$arch
Server = https://ca.gate.endeavouros.com/endeavouros/repo/$repo/$arch
Server = https://mirror.freedif.org/EndeavourOS/repo/$repo/$arch
Server = https://mirror.jingk.ai/endeavouros/repo/$repo/$arch
Server = https://mirror.funami.tech/endeavouros/repo/$repo/$arch
Server = https://mirrors.tuna.tsinghua.edu.cn/endeavouros/repo/$repo/$arch
Server = https://mirror.archlinux.tw/EndeavourOS/repo/$repo/$arch
Server = https://fastmirror.pp.ua/endeavouros/repo/$repo/$arch
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

cat /etc/pacman.d/mirrorlist | eos-sendlog

################################################################################
################# Arch Linux mirrorlist generated by Reflector #################
################################################################################
# With:       reflector --verbose -c DE -c NL --protocol https --sort rate --latest 20 --download-timeout 5 --threads 5
# When:       2024-02-19 10:20:59 UTC
# From:       https://archlinux.org/mirrors/status/json/
# Retrieved:  2024-02-19 10:20:18 UTC
# Last Check: 2024-02-19 10:18:47 UTC

## Germany
Server = https://arch.phinau.de/$repo/os/$arch

## Germany
Server = https://archlinux.thaller.ws/$repo/os/$arch

## Germany
Server = https://mirror.pagenotfound.de/archlinux/$repo/os/$arch

## Germany
Server = https://mirror.moson.org/arch/$repo/os/$arch

## Germany
Server = https://mirror.f4st.host/archlinux/$repo/os/$arch

## Germany
Server = https://mirror.sunred.org/archlinux/$repo/os/$arch

## Germany
Server = https://mirrors.niyawe.de/archlinux/$repo/os/$arch

## Germany
Server = https://de.arch.mirror.kescher.at/$repo/os/$arch

## Germany
Server = https://mirror.ubrco.de/archlinux/$repo/os/$arch

## Germany
Server = https://mirror.selfnet.de/archlinux/$repo/os/$arch

## Germany
Server = https://packages.oth-regensburg.de/archlinux/$repo/os/$arch

## Germany
Server = https://mirror.kumi.systems/archlinux/$repo/os/$arch

## Germany
Server = https://mirror.hugo-betrugo.de/archlinux/$repo/os/$arch

## Germany
Server = https://arch.unixpeople.org/$repo/os/$arch

## Germany
Server = https://mirror.cmt.de/archlinux/$repo/os/$arch

## Germany
Server = https://dist-mirror.fem.tu-ilmenau.de/archlinux/$repo/os/$arch

## Germany
Server = https://arch.kurdy.org/$repo/os/$arch

## Germany
Server = https://mirror.netcologne.de/archlinux/$repo/os/$arch

## Germany
Server = https://mirror.informatik.tu-freiberg.de/arch/$repo/os/$arch

## Germany
Server = https://mirrors.xtom.de/archlinux/$repo/os/$arch

:: Synchronizing package databases...
 endeavouros                               15,0 KiB   105 KiB/s 00:00 [--------------------------------------] 100%
 core                                     121,1 KiB   356 KiB/s 00:00 [--------------------------------------] 100%
 extra                                      7,9 MiB  3,59 MiB/s 00:02 [--------------------------------------] 100%
 community                                 45,0   B   208   B/s 00:00 [--------------------------------------] 100%
 multilib-testing                           3,8 KiB  17,0 KiB/s 00:00 [--------------------------------------] 100%
 multilib                                 138,9 KiB   267 KiB/s 00:01 [--------------------------------------] 100%
:: Starting full system upgrade...
:: Replace dbus-python with extra/python-dbus? [Y/n] n
resolving dependencies...
looking for conflicting packages...
error: failed to prepare transaction (could not satisfy dependencies)
:: installing icu (75.1-1) breaks dependency 'libicui18n.so=74-64' required by electron25
:: installing icu (75.1-1) breaks dependency 'libicuuc.so=74-64' required by electron25

Disable this repo in /etc/pacman.conf

Most probably you don’t need this package.

Try removing it by: sudo pacman -R electron25

Then run: LANG=C sudo pacman -Syyuu

Say Y (yes) to the replacement.

1 Like