Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have OSX 10.8.3 and my man pages are not showing up. I have had this problem when I was on 10.6, but not I want to fix it.

The reason why I cannot find man pages is because it is set to "/usr/local/texlive/2011/texmf/doc/man".. I want to find out where this is being set (the listing below shows that this is being set through cat command). Man pages exist in a bunch of directories (as shown below), but man does not find them because of the path being set to just one location. My shell is bash.

I looked at /etc/profile ~/.bash_profile ~/.bash_login ~/.profile ~/.bashrc and ~/.MacOSX/environment.plist and I do not see anything related to manpath.

Here is some pertinent information:

macosx@sh ~ $  > manpath

macosx@sh ~ $  > man -v
man, version 1.6c

macosx@sh ~ $  > uname -a
Darwin sh.local 12.3.0 Darwin Kernel Version 12.3.0: Sun Jan  6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64 x86_64

macosx@sh ~ $  > man -d man
Reading config file /private/etc/man.conf
Looked whether there exists a message catalog man, but there is none
(and for English messages none is needed)

found man directory /usr/share/man
found man directory /usr/local/share/man
found man directory /usr/X11/man
found manpath map /bin --> /usr/share/man
found manpath map /sbin --> /usr/share/man
found manpath map /usr/bin --> /usr/share/man
found manpath map /usr/sbin --> /usr/share/man
found manpath map /usr/local/bin --> /usr/local/share/man
found manpath map /usr/local/sbin --> /usr/local/share/man
found manpath map /usr/X11/bin --> /usr/X11/man
found manpath map /usr/bin/X11 --> /usr/X11/man
found manpath map /usr/bin/mh --> /usr/share/man

using /usr/bin/less -is as pager

using /usr/bin/less -is as browser

using /bin/cat to dump HTML pages as textadding /usr/local/texlive/2011/texmf/doc/man to manpath
No manual entry for man

# wanted to ignore commented out lines
macosx@sh ~ $  >cat /private/etc/man.conf | grep -v ^\#  
MANPATH /usr/share/man
MANPATH /usr/local/share/man
MANPATH /usr/X11/man
MANPATH_MAP /bin            /usr/share/man
MANPATH_MAP /sbin           /usr/share/man
MANPATH_MAP /usr/bin        /usr/share/man
MANPATH_MAP /usr/sbin       /usr/share/man
MANPATH_MAP /usr/local/bin      /usr/local/share/man
MANPATH_MAP /usr/local/sbin     /usr/local/share/man
MANPATH_MAP /usr/X11/bin        /usr/X11/man
MANPATH_MAP /usr/bin/X11        /usr/X11/man
MANPATH_MAP /usr/bin/mh     /usr/share/man
TROFF       /usr/bin/groff -Tps -mandoc -c
NROFF       /usr/bin/groff -Wall -mtty-char -Tascii -mandoc -c
JNROFF      /usr/bin/groff -Tnippon -mandocj -c
EQN     /usr/bin/eqn -Tps
NEQN        /usr/bin/eqn -Tascii
JNEQN       /usr/bin/eqn -Tnippon
TBL     /usr/bin/tbl
REFER       /usr/bin/refer
PIC     /usr/bin/pic
VGRIND      /usr/bin/vgrind
PAGER       /usr/bin/less -is
BROWSER     /usr/bin/less -is
HTMLPAGER   /bin/cat
CAT     /bin/cat
CMP     /usr/bin/cmp -s
COMPRESS    /usr/bin/bzip2
MANSECT     1:1p:8:2:3:3p:4:5:6:7:9:0p:tcl:n:l:p:o
.gz     /usr/bin/gunzip -c
.bz2        /usr/bin/bzip2 -c -d
.Z      /usr/bin/zcat

So I found this blog post on manpaths, and here is what I see:

macosx@sh ~ $  > cat /etc/profile
# System-wide .profile for sh(1)

if [ -x /usr/libexec/path_helper ]; then
    eval `/usr/libexec/path_helper -s`

if [ "${BASH-no}" != "no" ]; then
    [ -r /etc/bashrc ] && . /etc/bashrc

macosx@sh ~ $  >  /usr/libexec/path_helper -s
    PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/opt/local/bin:/opt/local/sbin:/usr/local/share/python:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Users/macosx/.gem/bin:/Users/macosx/.gem/ruby/1.8/bin:/usr/local/texlive/2011/bin/universal-darwin:/usr/texbin:/usr/X11/bin:/Users/macosx/.rvm/bin"; export PATH;
MANPATH="/usr/share/man:/usr/local/share/man:/opt/X11/share/man:/usr/local/texlive/2011/texmf/doc/man"; export MANPATH;

So manpath is being set correctly using path_helper, but it is being overwritten somewhere.

So to clarify, I am asking for Where something could be resetting the path, and I imaging I can force the problem to go away resetting manpath correctly. I am interested in finding out where manpath is being changed.

share|improve this question
What's the result of echo $MANPATH? – Daniel Beck Apr 29 '13 at 15:48
/etc/manpaths.d sounds like where TeXlive would put it. – slhck Apr 29 '13 at 15:55
updated the question.. echo $MANPATH gives me /usr/local/texlive/2011/texmf/doc/man – Trewq Apr 29 '13 at 15:58
env -i bash --login -xv will show you everything that happens during startup of your shell (assuming you use bash). Check whether there's something related to MANPATH in there. – Daniel Beck Apr 29 '13 at 17:45
Thanks Daniel - I feel like an idiot because I was overwriting the manpath in my bashrc (though I said I checked it, but I was obviously wrong). Your command helped me track it down. I cannot accept a comment as an answer - if you create an answer, I will accept. – Trewq Apr 29 '13 at 20:53

You must log in to answer this question.

Browse other questions tagged .