Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Can't Run Man command

Something seems to be broken ... when I try to run "man sudoers", I get the following message:

man: No such file or directory
Failed to open the message catalog man on the path NLSPATH=<none>

No manual entry for sudoers

However, when I try to do the same via Bwana, I'm able to see the man page at file:///private/var/tmp/folders.501/TemporaryItems/sudoers.html. How can I fix this?

Posted on Sep 20, 2005 8:00 AM

Reply
7 replies

Sep 20, 2005 8:49 AM in response to Jeff Hubbach

I hate to reply to my own post, but I wanted to make sure you read this:

OK, it looks like you have a blank NLSPATH set somewhere in your shell setup files. Here's a test I ran that points to this problem:

[jhubbach@JeffPB]~ 501 $ man foo
No manual entry for foo
[1][jhubbach@JeffPB]~ 502 $ NLSPATH=
[jhubbach@JeffPB]~ 503 $ export NLSPATH
[jhubbach@JeffPB]~ 504 $ man foo
man: No such file or directory
Failed to open the message catalog man on the path NLSPATH=

No manual entry for foo
[1][jhubbach@JeffPB]~ 505 $

So, my guess is in ~/.bashrc, NLSPATH is being set and exported as an empty value. Remove the lines that set this value and you should be back to normal.

Sep 20, 2005 9:03 AM in response to Jeff Hubbach

I'm not seeing ~/.bashrc in my directory, just .profile where I have set my shell configuration and .bash_history. Here's what I get:

[10:58 AM] ~ 17 $ NLSPATH
-bash: NLSPATH: command not found

[11:00 AM] ~ 20 $ NLSPATH=
[11:01 AM] ~ 21 $ export NLSPATH
[11:01 AM] ~ 22 $ man sudoers
man: No such file or directory
Failed to open the message catalog man on the path NLSPATH=

No manual entry for sudoers

Sep 20, 2005 9:09 AM in response to Lola Lee

Lola,

Try the following:

unset NLSPATH


man sudoers


If this works, one of your shell setup files is setting NLSPATH. You need to track that down and remove it.

The likely culprits are:
/etc/profile
~/.bash_profile
~/.bash_login
~/.profile
~/.bashrc

Also, those files might include other files. Did you install fink? If so, check /sw/bin/init.sh. That file also includes any files in /sw/etc/profile.d/

Sep 20, 2005 10:02 AM in response to Jeff Hubbach

no luck - still getting the error message. It looks to me like NLSPATH is never being set, from the error message that I'm getting.

When I go to /etc/bashrc, I'm seeing:

# System-wide .bashrc file for interactive bash(1) shells.
if [ -n "$PS1" ]; then PS1='\h:\w \u\$ '; fi
# Make bash check it's window size after a process completes
shopt -s checkwinsize

I do have fink installed but I never use it. I do see this bit:

if [ -z "$MANPATH" ]; then
MANPATH=`/usr/bin/manpath -q`
prepend_path MANPATH /sw/share/man
else
prepend_path MANPATH /sw/share/man
fi
export MANPATH

man and manpath are in /usr/bin directory.

Opening /etc/profile, I see:

# System-wide .profile for sh(1)

PATH="/bin:/sbin:/usr/bin:/usr/sbin"
export PATH

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

Sep 20, 2005 10:16 AM in response to Lola Lee

I figured out how to get your exact error message:

1) have a MANPATH set
2) have NLSPATH set to <none>

To correct the problem (the NLSPATH doesn't actually matter, that I can tell), you need to unset MANPATH. This is what the first post I linked to outlines. After rereading your original post, I thought it might be something different, but it turns out it's the same thing.

Try this:

unset MANPATH


man sudoers


If that works, then you need to read that first thread and track down where MANPATH is being set and get rid of it. The reasoning is all in that thread I linked to.

Can't Run Man command

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.