I went through my .pacnew files uing pacdiff. I tried to compare them as good as I could and for some of them I decided to overwrite the old files with the .pacnew files.
I can’t recall all of them, but I definitely replaced pacman.conf and pamac.conf
Now, when I try to sync my system, I get following error:
sudo pacman -Syu
:: Synchronizing package databases...
error: failed to synchronize all databases (unexpected error)
The error is not specified to GPGME or db.lck or something similar; that’s why I was not able to find a solution for me here in the forum, nor by googling it.
Some people are currently having the problem that the community.db is still in the pacman.conf. I imagine this might be the case for you, too.
Edit your /etc/pacman.conf and make sure your repo config part look like this
[core]
Include = /etc/pacman.d/mirrorlist
[extra]
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]
Include = /etc/pacman.d/mirrorlist
You need to remove the following.
[community]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist
Then in the terminal
sudo pacman-mirrors --fasttrack
sudo pacman -Syu
If you haven’t made any changes to pacman.conf, you can simply type the following in the terminal.
@admdb I already replaced pacman.conf with it’s .pacnew counterpart (I didn’t save the original); so the community repo is not in there anymore.
The error message is not specific for any repo. It shows everytime I try to sync or install anything:
sudo pacman -Syu
:: Synchronizing package databases...
error: failed to synchronize all databases (unexpected error)
Here is the full 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 manjaro-system
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
Architecture = auto
#IgnorePkg =
#IgnorePkg =
#IgnoreGroup =
#NoUpgrade =
#NoExtract =
# Misc options
#UseSyslog
Color
#NoProgressBar
CheckSpace
#VerbosePkgLists
ParallelDownloads = 4
DownloadUser = alpm
#DisableSandbox
#ILoveCandy
# 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 and Manjaro Linux
# packagers with `pacman-key --populate archlinux manjaro`.
#
# 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.
#
[core]
Include = /etc/pacman.d/mirrorlist
[extra]
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]
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
sudo pacman -Syu
[sudo] password for jo:
:: Synchronizing package databases...
core is up to date
extra 8.3 MiB 4.04 MiB/s 00:02 [################################################################] 100%
multilib 143.1 KiB 325 KiB/s 00:00 [################################################################] 100%
:: Starting full system upgrade...
there is nothing to do
It doesn’t tell you why it failed? Or on which database?
You could try to run the command with the -v switch for more verbose output.
Perhaps that will yield something to go on?
sudo pacman -Syuv
[sudo] password for jo:
Root : /
Conf File : /etc/pacman.conf
DB Path : /var/lib/pacman/
Cache Dirs: /var/cache/pacman/pkg/
Hook Dirs : /usr/share/libalpm/hooks/ /etc/pacman.d/hooks/
Lock File : /var/lib/pacman/db.lck
Log File : /var/log/pacman.log
GPG Dir : /etc/pacman.d/gnupg/
Targets : None
:: Synchronizing package databases...
core is up to date
extra is up to date
multilib is up to date
:: Starting full system upgrade...
there is nothing to do
The error occured after I replaced some old files with their new .pacnew files. I thought I was careful, but apparentely not careful enough.
Unfortunately I do not remember all the files I replaced and I didn’t save the originals.
sudo pacman -Syu --debug
debug: pacman v7.0.0 - libalpm v15.0.0
debug: config: new section 'options'
debug: config: HoldPkg: pacman
debug: config: HoldPkg: glibc
debug: config: HoldPkg: manjaro-system
debug: config: Architecture: auto
debug: config: arch: x86_64
debug: config: sandboxuser: alpm
debug: config: SigLevel: Required
debug: config: SigLevel: DatabaseOptional
debug: config: LocalFileSigLevel: Optional
debug: config: new section 'core'
debug: config file /etc/pacman.conf, line 72: including /etc/pacman.d/mirrorlist
debug: config: new section 'extra'
debug: config file /etc/pacman.conf, line 75: including /etc/pacman.d/mirrorlist
debug: config: new section 'multilib'
debug: config file /etc/pacman.conf, line 81: including /etc/pacman.d/mirrorlist
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: 599) : missing PGP signature
debug: missing optional signature
debug: setting usage of 15 for core repository
debug: adding new server URL to database 'core': http://ftp.free.org/mirrors/repo.manjaro.org/repos/stable/core/x86_64
debug: adding new server URL to database 'core': https://mirrors.nic.cz/manjaro/stable/core/x86_64
debug: adding new server URL to database 'core': https://mirrors.cicku.me/manjaro/stable/core/x86_64
debug: adding new server URL to database 'core': https://ftp.lysator.liu.se/pub/manjaro/stable/core/x86_64
debug: adding new server URL to database 'core': https://manjaro.repo.cure.edu.uy/stable/core/x86_64
debug: registering sync database 'extra'
debug: database path for tree extra set to /var/lib/pacman/sync/extra.db
debug: "/var/lib/pacman/sync/extra.db.sig" is not readable: No such file or directory
debug: sig path /var/lib/pacman/sync/extra.db.sig could not be opened
debug: got error 43 at _alpm_gpgme_checksig (../lib/libalpm/signing.c: 599) : missing PGP signature
debug: missing optional signature
debug: setting usage of 15 for extra repository
debug: adding new server URL to database 'extra': http://ftp.free.org/mirrors/repo.manjaro.org/repos/stable/extra/x86_64
debug: adding new server URL to database 'extra': https://mirrors.nic.cz/manjaro/stable/extra/x86_64
debug: adding new server URL to database 'extra': https://mirrors.cicku.me/manjaro/stable/extra/x86_64
debug: adding new server URL to database 'extra': https://ftp.lysator.liu.se/pub/manjaro/stable/extra/x86_64
debug: adding new server URL to database 'extra': https://manjaro.repo.cure.edu.uy/stable/extra/x86_64
debug: registering sync database 'multilib'
debug: database path for tree multilib set to /var/lib/pacman/sync/multilib.db
debug: "/var/lib/pacman/sync/multilib.db.sig" is not readable: No such file or directory
debug: sig path /var/lib/pacman/sync/multilib.db.sig could not be opened
debug: got error 43 at _alpm_gpgme_checksig (../lib/libalpm/signing.c: 599) : missing PGP signature
debug: missing optional signature
debug: setting usage of 15 for multilib repository
debug: adding new server URL to database 'multilib': http://ftp.free.org/mirrors/repo.manjaro.org/repos/stable/multilib/x86_64
debug: adding new server URL to database 'multilib': https://mirrors.nic.cz/manjaro/stable/multilib/x86_64
debug: adding new server URL to database 'multilib': https://mirrors.cicku.me/manjaro/stable/multilib/x86_64
debug: adding new server URL to database 'multilib': https://ftp.lysator.liu.se/pub/manjaro/stable/multilib/x86_64
debug: adding new server URL to database 'multilib': https://manjaro.repo.cure.edu.uy/stable/multilib/x86_64
debug: option 'sandboxuser' = alpm
:: Synchronizing package databases...
error: failed to synchronize all databases (unexpected error)
debug: unregistering database 'local'
debug: unregistering database 'core'
debug: unregistering database 'extra'
debug: unregistering database 'multilib'
Yes, first I replaced the original /etc/passwd with it’s .pacnew equivalent.
After realising it was a bad decision I replaced it with the backup file again /etc/passwd-
I thought this would make it all back to normal…
It was a smart move.
But that user (alpm) was not in there - and it not existing is now perhaps the cause of your problem.
That user (not just the group) needs to be added.
I don’t know how exactly to do it.
If I knew I’d tell you.
/etc/shadow and /etc/gshadow also needs to reflect it
adduser ... or useradd ... … something like that needs to be run in order to create it
If it is only missing from /etc/passwd
(it is present in /etc/shadow and /etc/gshadow and /etc/group …)
then adding this line to /etc/passwd should work™
alpm:x:956:956:Manjaro Linux Package Management:/:/usr/bin/nologin
The numbers need to match the ones in the other files - this is from my own system and the user and group numbers likely are not the same as yours.
Probably re-login or reboot before testing the effect.