MacOS – Linking manuals from Homebrew

command linehomebrewmacosterminal

Whenever I install a software with Homebrew and I try to view the manual I get an error stating:

No manual entry for <name of program>.

As an example, wget: when I type

$ man wget
No manual entry for wget

So, I'm wondering how to link the man pages so I can view them with the command.

Best Answer

If you installed Homebrew with standard install directories, i.e. relatives to /usr/local, there are 2 commands to register the binaries and man files to be used:

/usr/bin/sudo -s
echo /usr/local/bin >/etc/paths.d/homebrew
echo /usr/local/share/man >/etc/manpaths.d/homebrew
exit

If you are using bash or zsh as your actual shell, you will have to enter one simple command to take into account these 2 environment modifications:

. /etc/profile

If you want to learn more how these 2 directories are used under MacOS X, read:

man path_helper