[Solved] Sudo stops working after a few minutes, [Unsolved] pamac "error: package was not found"

Hello,

I’ve been using Manjaro Cinnamon since March 2020 with no problems.

I now made a fresh installation of Manjaro Cinnamon minimal ISO and have a weird problem:

After startup sudo works normally. However, after about 5 minutes it stops working. If i trigger a window that prompts me for my password e.g. pamac or timeshift, my password is not accepted and below the entry field it says “time left to unlock x minutes” and it is counting down from i think initially 10 minutes. The countdown is already in progress at this time (so sometimes it is down to 2 minutes already when the window is triggered), so the countdown doesn’t start when i trigger the window but is already triggered by something else beforehand. After the countdown is finished, sudo works normally again and accepts my password.

Also, maybe related to this issue, i can’t install packages with pacman. Updating, Querying and removing installed packages works fine, however if i -Syu or -Q a package that is not already installed it says e.g. “error: package ‘kdenlive’ was not found”. Strangely, pacman reports that all packages are up-to-date:

sudo pacman -Syu
:: Synchronizing package databases…
core is up to date
extra is up to date
community is up to date
multilib is up to date
:: Starting full system upgrade…
there is nothing to do

Pamac works fine and i can install packages with the GUI and the CLI.

I am at a loss for what to do and reinstalled Manjaro twice but always got the same results. As i mentioned, Manjaro worked fine for me with my previous install from March 2020.

Do you have an idea what might be the cause for this behaviour?

Sort your mirrors first… ie:

sudo pacman-mirrors -f && sudo pacman -Syyu

Wrt the timeout of sudo, check your configuration in /etc/sudoers, see this article that might help with that, or some other related search results.

Thank you for your reply. The new mirrorlist was created, however the problem still remains (i had to remove most of the output because i am not allowed to include links):

[sperber@sperber ~]$ sudo pacman-mirrors -f && sudo pacman -Syyu

::INFO Mirror list generated and saved to: /etc/pacman.d/mirrorlist
:: Synchronizing package databases…
core 169,5 KiB 253 KiB/s 00:01 [##################################################] 100%
extra 1999,3 KiB 1734 KiB/s 00:01 [##################################################] 100%
community 6,3 MiB 6,38 MiB/s 00:01 [##################################################] 100%
multilib 189,4 KiB 8,04 MiB/s 00:00 [##################################################] 100%
:: Starting full system upgrade…
there is nothing to do
[sperber@sperber ~]$ sudo pacman -Q kdenlive
error: package ‘kdenlive’ was not found
[sperber@sperber ~]$ sudo pacman -Q blender
error: package ‘blender’ was not found

Thank you for your reply.

What do you mean by “wrt the timeout of sudo”? Do you mean to set it to 0?

Is ist possible for me to see what process tried to invoke sudo and is responsible for triggering the time span in which i cannot use sudo?

I think my problem is, that something else is interacting with sudo in an incorrect manner and thereby prevents me from accessing sudo.

Well … -Q only lists something already installed…

Do you have those things installed? According to your output you do not.

To search for a package using pacman … its, ex: pacman -Ss blender

(Q is for query … as in query your packages … pacman -Q firefox will give you, if installed, something like this with the package name and version : firefox 83.0-2, pacman -Qi firefox will query the more full package information, like packager and dependencies etc)

Please also note … do not use sudo unless you need to … like for installing or removing packages.

1 Like
  • “wrt” is an abbrevation for “With respect to”
  • Setting it to zero is not recommended or advisable because you would completly disable the protections of the default sudo security policy plugin.
    In other words you might as well work as root 24/7 which is the worst mistake you can make…

That timeout is part of how sudo operates.
(Edit: Oops i have no idea about the timeout to restrict the usage of sudo)

You are right, it works with sudo pacman -Ss when i check for individual packages. Thank you for the clarification and sorry for my mistake.

The strange thing is, that e.g. gnome-calculator is found with pacman -Ss gnome-calculator

[sperber@sperber ~]$ sudo pacman -Ss gnome-calculator
[sudo] password for sperber:
extra/gnome-calculator 3.38.2-1 (gnome) [installed]
GNOME Scientific calculator

However, when i try to install software with sudo pacman -Syu --needed - < manjaro-pkg-install it says error: target not found: gnome-calculator and other packages (all packages are already installed but only some are recognized by pacman):

[sperber@sperber Linux]$ sudo pacman -Syu --needed - < manjaro-pkg-install
[sudo] password for sperber:
:: Synchronizing package databases…
core is up to date
extra is up to date
community is up to date
multilib is up to date
warning: apparmor-3.0.0-2 is up to date – skipping
warning: baobab-3.38.0-1 is up to date – skipping
error: target not found: celluloid
error: target not found: deja-dup
warning: ffmpegthumbnailer-2.2.2-2 is up to date – skipping
error: target not found: firefox
error: target not found: gnome-calculator
error: target not found: gscan2pdf
error: target not found: gthumb
warning: gufw-20.04.1-4 is up to date – skipping
error: target not found: imwheel
error: target not found: keepassxc
error: target not found: libreoffice-fresh
warning: gnome-disk-utility-3.38.0-1 is up to date – skipping
error: target not found: nemo-audio-tab
warning: nemo-bulk-rename-20170914-1 is up to date – skipping
warning: nemo-fileroller-4.8.0-2 is up to date – skipping
warning: nemo-media-columns-4.6.0-1 is up to date – skipping
warning: nemo-pdf-tools-1.2.9.0extras20.04.03-5 is up to date – skipping
warning: nemo-terminal-4.8.0-2 is up to date – skipping
error: target not found: numlockx
error: target not found: okular
error: target not found: pdfarranger
warning: pulseaudio-modules-bt-1.4-4 is up to date – skipping
error: target not found: redshift
error: target not found: seahorse
error: target not found: stubby
error: target not found: telegram-desktop
error: target not found: tilda
error: target not found: timeshift
warning: xed-2.8.0-1 is up to date – skipping
error: target not found: youtube-dl
error: target not found: zim

If i tell pamac to install these packages via CLI it works as expected:

[sperber@sperber ~]$ sudo pamac install apparmor baobab celluloid deja-dup ffmpegthumbnailer firefox gnome-calculator gnome-disk-utility gscan2pdf gthumb gufw imwheel keepassxc libreoffice-fresh nemo-audio-tab nemo-bulk-rename nemo-fileroller nemo-media-columns nemo-pdf-tools nemo-terminal numlockx okular pdfarranger pulseaudio-modules-bt redshift seahorse stubby telegram-desktop tilda timeshift xed youtube-dl zim
[sudo] password for sperber:
Preparing…
Nothing to do.
Transaction successfully finished.

What am i not understanding?

Maybe lets reset the whole mirrorlist and see:

sudo pacman-mirrors --country all --api --protocols all --set-branch stable && sudo pacman -Syyu
2 Likes

if you have changed your primary mirror using pacman-mirrors - you should use a double y

sudo pacman -Syyu --needed - < manjaro-pkg-install
1 Like

Unfortunately neither the reset of the whole mirrorlist, nor -Syyu make a difference. Pacman still returns the same output with the same packages as “error: target not found:”.

I found the process that triggered sudo in the background and left me unable to use sudo. It was a misconfigured cronjob that i created.

To identify the process i found the following method:

journalctl > journalctl.txt

Then i searched journalctl.txt for “sudo” and could see what process invoked sudo unsuccessfully.

1 Like