OS X El Capitan: man, command not found
Apple publishes the source code for the open source parts of OSX. So the source for "man" is retrievable from https://opensource.apple.com/tarballs/man/ . The latest version (as of this writing) is v1.6c. Provided you have at least the Command Line Tools installed (you can run xcode-select --install
to get them if you don’t):
curl -LORf 'https://opensource.apple.com/tarballs/man/man-16.tar.gz'
tar -xzvf man-16.tar.gz
cd man-16/man
# Undo an Apple patch that adds a dependency on 'xcselect.h',
# which is something that Apple doesn't appear to distribute.
patch -R -p0 <../patches/PR11291804-xcode.diff
./configure --prefix=/usr/local
make
make install
That done, the man
binary should be available at /usr/local/bin/man
. Also note that you might need to run hash -r
to clear the hash table of any instances of /usr/bin/man
that may be lingering there from the last time you ran man
before the addition to /usr/local/bin/
will be picked up.