$ sudo systemctl --failed
[sudo] Passwort für space:
UNIT LOAD ACTIVE SUB DESCRIPTION
● pkgfile-update.service loaded failed failed pkgfile database update
LOAD = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB = The low-level unit activation state, values depend on unit type.
1 loaded units listed.
and how do I fix it?
I see an error about pkgfile database once in while also when I shut down Manjaro.
Basically my system runs smooth and without any problems.
pkgfile keeps its own database and keeps a service running so that if you mistype or enter in a command it doesnt recognize it will scour that db to suggest a package.
If you dont need/want it then just remove it.
As to investigating why its not working … maybe try looking at the service to start:
$ sudo LANG=C pkgfile -u
[sudo] Passwort für space:
:: Updating 4 repos...
core is up to date
extra is up to date
community is up to date
multilib is up to date
but
$ systemctl status pkgfile-update
× pkgfile-update.service - pkgfile database update
Loaded: loaded (/usr/lib/systemd/system/pkgfile-update.service; static)
Active: failed (Result: exit-code) since Sat 2023-05-27 00:42:45 CEST; 1h 48min ago
TriggeredBy: ● pkgfile-update.timer
Process: 1676 ExecStart=/usr/bin/pkgfile -u (code=exited, status=1/FAILURE)
Main PID: 1676 (code=exited, status=1/FAILURE)
CPU: 20ms
Mai 27 00:42:45 time pkgfile[1676]: error: failed to update repo: extra
Mai 27 00:42:45 time pkgfile[1676]: warning: download failed: https://mirror.netcologne.de/manjaro/stable>
Mai 27 00:42:45 time pkgfile[1676]: error: failed to update repo: core
Mai 27 00:42:45 time pkgfile[1676]: warning: download failed: https://mirror.netcologne.de/manjaro/stable>
Mai 27 00:42:45 time pkgfile[1676]: error: failed to update repo: community
Mai 27 00:42:45 time pkgfile[1676]: warning: download failed: https://mirror.netcologne.de/manjaro/stable>
Mai 27 00:42:45 time pkgfile[1676]: error: failed to update repo: multilib
Mai 27 00:42:45 time systemd[1]: pkgfile-update.service: Main process exited, code=exited, status=1/FAILU>
Mai 27 00:42:45 time systemd[1]: pkgfile-update.service: Failed with result 'exit-code'.
Mai 27 00:42:45 time systemd[1]: Failed to start pkgfile database update.
lines 1-18/18 (END)
systemctl status pkgfile-update
× pkgfile-update.service - pkgfile database update
Loaded: loaded (/usr/lib/systemd/system/pkgfile-update.service; static)
Active: failed (Result: exit-code) since Sat 2023-05-27 00:42:45 CEST; 2h 2min ago
TriggeredBy: ● pkgfile-update.timer
Main PID: 1676 (code=exited, status=1/FAILURE)
CPU: 20ms
Mai 27 00:42:45 time pkgfile[1676]: error: failed to update repo: extra
Mai 27 00:42:45 time pkgfile[1676]: warning: download failed: https://mirror.netcologne.de/manjaro/stable>
Mai 27 00:42:45 time pkgfile[1676]: error: failed to update repo: core
Mai 27 00:42:45 time pkgfile[1676]: warning: download failed: https://mirror.netcologne.de/manjaro/stable>
Mai 27 00:42:45 time pkgfile[1676]: error: failed to update repo: community
Mai 27 00:42:45 time pkgfile[1676]: warning: download failed: https://mirror.netcologne.de/manjaro/stable>
Mai 27 00:42:45 time pkgfile[1676]: error: failed to update repo: multilib
Mai 27 00:42:45 time systemd[1]: pkgfile-update.service: Main process exited, code=exited, status=1/FAILU>
Mai 27 00:42:45 time systemd[1]: pkgfile-update.service: Failed with result 'exit-code'.
Mai 27 00:42:45 time systemd[1]: Failed to start pkgfile database update.
lines 1-17/17 (END)
The real question is, do you really need pkgfile at all? Is sudo pacman -Fx or Fy good enough for your needs? Removing pkgfile and thus the .service and .timer issue(s) wil go away. It is removed here with no consequences. I had original poster’s issue on some but not all installs.
If you want to keep pkgfle, I had the following in my notes:
adding nss-lookup.target to the After=network-online.target line in
pkgfile-update.service it now completes without error.