I am an unprivileged user on a system, so I have installed some software in my home directory. In addition to adding ~/.local/usr/bin to my PATH, I've added ~/.local/usr/share/man to my MANPATH so I can query the man pages for those packages.
For example, one such command is cgdb.
man cgdb works fine, it is getting the manpage from my MANPATH environment variable.
But apropos cgdb (man -k cgdb, whatis cgdb) is not working.
$ apropos cgdb
cgdb: nothing appropriate
I read in man apropos then man whatis that the whatis database can be regenerated with makewhatis, but it seems this can only be done by a privileged user in the system directories. I couldn't find any way to do this in user space.
Is it possible to use apropos (a.k.a. man -k) on non-system directories pointed to by MANPATH by non-privileged users?
FWIW: this is on a CentOS 6 server
$ uname -osrv
Linux 2.6.32-754.11.1.el6.x86_64 #1 SMP Tue Feb 26 15:38:56 UTC 2019 GNU/Linux
$ lsb_release -d
Description: CentOS release 6.6 (Final)