There is definitely some weirdness with PackageKit. I already had powertop
installed but wanted to test out what you're having issues with.
$ rpm -ql PackageKit-command-not-found
/etc/PackageKit/CommandNotFound.conf
/etc/profile.d/PackageKit.sh
/usr/libexec/pk-command-not-found
So from the above you can run the command that PackageKit will run to do the search like so:
$ /usr/libexec/pk-command-not-found <command>
Example
$ /usr/libexec/pk-command-not-found powertop
bash: powertop: command not found...
$ which powertop
/usr/bin/powertop
Running it a 2nd time I got it to recommend powertop
:
$ /usr/libexec/pk-command-not-found powertop
bash: powertop: command not found...
Install package 'powertop' to provide command 'powertop'? [N/y]
So why isn't it finding powertop?
I think that ultimately the root cause is the timeout that's defined in the config file: /etc/PackageKit/CommandNotFound.conf
:
MaxSearchTime=2000
This timeout is to cap how long PackageKit will take to do it's query. The query is not against your local Yum cache, it's searching live against Yum repositories that you have configured on the internet. Therefore if you want it to be more thorough vs. more performant you have the following trade-off:
# aggressive find
MaxSearchTime=15000
# more responsive
MaxSearchTime=250
When you have both an init.d
script, and a systemd .service
file with the same name, systemd will use the service file for all operations. I believe the service
command will just redirect to systemd. The init.d script will be ignored.
Use systemd
. It's new in Debian 8, but it's the default. Systemd service files are supposed to look simpler than init.d scripts. You didn't mention any specific feature you need that's not supported by the systemd service.
If the service file was not included, systemd
would happily use the init.d script. So the mongod package developer is telling you they think this systemd definition is better :).
Look at the output of systemctl status mongod
. If the service is enabled to be started at boot time, the Loaded:
line will show "enabled". Otherwise you can use systemctl enable mongod
. You can also include the option --now
, and it will start mongod at the same time.
Best Answer
It is probably caused by
prelink
being run every day: