I have recently noticed that the commands apropos and whatis are no longer returning a result for me on anything. However my man command seems to be working just fine.
If anyone knows how to fix this problem I would be very grateful!
The interesting point is what /etc/alternatives/whatis is pointing to.
So run
[vek@newbox ~]$ alternatives --display man
man - status is manual.
link currently points to /usr/bin/man.man-db
/usr/bin/man.man-db - priority 300
follower apropos: /usr/bin/apropos.man-db
follower whatis: /usr/bin/whatis.man-db
follower makewhatis: (null)
follower apropos.1.gz: /usr/share/man/man1/apropos.man-db.1.gz
follower man.1.gz: /usr/share/man/man1/man.man-db.1.gz
follower whatis.1.gz: /usr/share/man/man1/whatis.man-db.1.gz
follower makewhatis.8.gz: (null)
/usr/bin/man.mandoc - priority 200
follower apropos: /usr/bin/apropos.mandoc
follower whatis: /usr/bin/whatis.mandoc
follower makewhatis: /usr/sbin/makewhatis.mandoc
follower apropos.1.gz: /usr/share/man/man1/apropos.mandoc.1.gz
follower man.1.gz: /usr/share/man/man1/man.mandoc.1.gz
follower whatis.1.gz: /usr/share/man/man1/whatis.mandoc.1.gz
follower makewhatis.8.gz: /usr/share/man/man8/makewhatis.mandoc.8.gz
Current `best' version is /usr/bin/man.man-db.
[vek@newbox ~]$
I tested /usr/bin/whatis.mandoc and it didn’t work, whereas /usr/bin/whatis.man-db does. If you have two choises you can select which one you will be using by running sudo alternatives --config man
Being offline, just a weird guess: usually you need to run mkwhatis as root, which is usually scheduled to be run daily or once a week. Not sure if it the same with Fedora.
I’ve tried that out, seems like I only have one choice:
[andrewforrest@fedora ~]$ alternatives --display man
man - status is auto.
link currently points to /usr/bin/man.man-db
/usr/bin/man.man-db - priority 300
follower apropos: /usr/bin/apropos.man-db
follower whatis: /usr/bin/whatis.man-db
follower man.1.gz: /usr/share/man/man1/man.man-db.1.gz
follower apropos.1.gz: /usr/share/man/man1/apropos.man-db.1.gz
follower whatis.1.gz: /usr/share/man/man1/whatis.man-db.1.gz
Current `best' version is /usr/bin/man.man-db.
[andrewforrest@fedora ~]$ sudo alternatives --config man
[sudo] password for andrewforrest:
There is 1 program that provides 'man'.
Selection Command
-----------------------------------------------
*+ 1 /usr/bin/man.man-db
Enter to keep the current selection[+], or type selection number:
makewhatis is specific to mandoc. Most modern distros use man-db by default, not mandoc.
man-db’s apropos and whatis use the same database, handled by mandb.
In Fedora, mandb update is automatically triggered by dnf transactions involving packages that contain man files, so there’s no need for scheduled updates (for typical users who aren’t installing/editing manpages outside of distro packages).