I believe that I found the solution to this problem.
I realized through this forum question that pkgfile-update.service was not running on my computer, although pkgfile-update.timer seems to be active.
These files are located in
I started researching the configuration of systemd service files, which led me to a question on an Arch Linux forum (unfortunately, as a newly registered member, I cannot link to it here). There I found that every .service file has a [Install] section, where the service execution targets are defined. And that section was missing from my pkgfile-update.service file. In addition, in the [Unit] section, at the end of the After and Wants lines, I added
systemd-user-sessions.service , so that all user processes logged on the system are closed without generating new errors.
So, for me, the solution was to include the following content at the end of the file:
nano /lib/systemd/system/pkgfile-update.service [Install] WantedBy = poweroff.target reboot.target
With these lines, the service runs every time the system is shut down or restarted. So far, the error message has stopped appearing before the system shutdown.
This is the complete file, with the changes made:
nano /lib/systemd/system/pkgfile-update.service [Unit] Description=pkgfile database update RequiresMountsFor="/var/cache/pkgfile" After=network-online.target systemd-user-sessions.service Wants=network-online.target systemd-user-sessions.service [Service] Type=oneshot ExecStart=/usr/bin/pkgfile -u Nice=19 StandardOutput=null StandardError=journal PrivateTmp=yes PrivateDevices=yes CapabilityBoundingSet= NoNewPrivileges=yes [Install] WantedBy=poweroff.target reboot.target
I hope this helps everyone who uses the zsh shell and is experiencing this problem.
And I’m sorry for any typos. I am Brazilian and do not have much knowledge of English.