I am currently attempting to add a custom man page to /usr/local/man for the binary in /usr/local/bin. However, the expected behavior differs from my interpretation of the manual. As well as the logical expectations of its function.
The steps I have taken to deduce thus far are as follows:
:~$ echo $MANPATH
:~$ export MANPATH=$(manpath)
:~$ echo $MANPATH
/usr/local/man:/usr/local/share/man:/usr/share/man
:~$ man my_binary
No manual entry for my_binary
~:$ ls -l /usr/local/man/my_binary.1
-rw-r--r-- 1 root staff 18205 Feb 17 18:16 /usr/local/man/my_binary.1
In addition to, I tried to set it up in my .bashrc and initiate a new login shell to no avail.
:~$ echo 'export MANPATH=$(manpath)' >> ~/.bashrc
:~$ exit
:~$ #New terminal
:~$ echo $MANPATH
/usr/local/man:/usr/local/share/man:/usr/share/man
:~$ man my_binary
No manual entry for my_binary
My /etc/manpath.conf looks like:
MANPATH_MAP /usr/local/bin /usr/local/man
MANPATH_MAP /usr/local/bin /usr/local/share/man
MANDB_MAP /usr/local/man /var/cache/man/oldlocal
MANDB_MAP /usr/local/share/man /var/cache/man/local
My versions look like:
:~$ uname -a
Linux Bitblock 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 GNU/Linux
:~$ cat /etc/debian_version
9.6
:~$ man --version
man 2.7.6.1
my_binary.1
should live in the directory/usr/local/man/man1/