Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've installed mac-ports which puts everything under /opt/local. The corresponding man pages are in /opt/local/man. I added the following line to /private/etc/man.conf representing the man search path for port:

MANPATH /opt/local/man/man1

However, when I invoke man on its own:

> man port

I get the following error:

No manual entry for port

Is this the correct way to add a new search path for man?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

You're very close. You should have added this:

MANPATH /opt/local/man/

Not with /man1 appended to it. In /private/etc/man.conf, there's a line commented that you simply have to uncomment:

# Uncomment if you want to include one of these by default
#
# MANPATH       /opt/*/man
# MANPATH       /usr/lib/*/man

The /opt/*/man is your...man.

share|improve this answer
1  
And because MANPATH is an environment variable, you need to restart your environment (e.g. new shell, etc) so that man.conf is re-parsed and MANPATH set to include the new directory. –  Ben Lever Jun 16 '09 at 22:58
1  
Technically it's /opt/local/share/man -- beware if it suddenly stops working in the future :-) –  Nerdling Aug 26 '09 at 12:16

You have to point to the root, so:

MANPATH=/opt/local/man man port

should work.

You should add any additional paths you have to /etc/manpath.config so that they'll work for everyone.

share|improve this answer
    
+1 for the tip to add to /etc/manpath.config –  Joe Jun 14 '09 at 15:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.