2

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?

Chealion
  • 5,713
  • 27
  • 29
Ben Lever
  • 135
  • 1
  • 5

2 Answers2

2

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.

brian-brazil
  • 3,904
  • 1
  • 20
  • 15
1

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.

jth
  • 126
  • 3
  • 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 :-) – Jeremy L Aug 26 '09 at 12:16