|
|
#1 |
|
Prospect
Join Date: Sep 2009
Posts: 10
|
man command not working
Hi,
I'm very new to unix, so I'm mostly running through various tutorials to get a feel for it. I've stumbled into a problem which I cannot find an answer to in any documentation so far: trying to get to command manuals with man "command" gives the output "No manual entry for 'command'", same with every common command I've tried. The man command itself seems to work, asking for what page I want. Also, I can see various man pages in /usr/share/man. So it seems that man simply do not know where to look. Is it a configuring/PATH problem? Can I (with my very limited knowledge...) fix this? I'm running Mac OS Snow Leopard. Thanks, K-märkt |
|
|
|
|
|
#2 |
|
Site Admin
Join Date: Jan 2002
Location: Montreal
Posts: 31,940
|
Have you changed anything in your shell configuration? E.g. created a "dot" file in your home folder?
Which shell are you using? See this Unix FAQ for more info.
__________________
hayne.net/macosx.html |
|
|
|
|
|
#3 |
|
Prospect
Join Date: Sep 2009
Posts: 10
|
Yes, I have a .bash_profile there, containing the single row "export PATH=$PATH:~/bin"; however, I couldn't get to the man pages before I created that either. Perhaps I should remove it anyway?
K_märkt |
|
|
|
|
|
#4 | |||||||||||||||||||||||
|
Site Admin
Join Date: Jan 2002
Location: Montreal
Posts: 31,940
|
Yes - definitely try removing that file (and all other "dot" files that you created) and then open a new Terminal window. And by the way, I don't think ~ works when setting PATH like above - try using $HOME instead.
__________________
hayne.net/macosx.html |
|||||||||||||||||||||||
|
|
|
|
|
#5 |
|
Prospect
Join Date: Sep 2009
Posts: 10
|
I removed the .bash_profile and opened a new window, but with the same result - no man pages can be found. The "export PATH=$PATH:~/bin" is an example from Enzer's Unix for Mac OS Tiger and it did work for finding the small scripts I had put in the bin folder, but maybe there are more straight forward ways of doing it.
Thanks for the tip on the Unix FAQ, I found it really useful! What I would also like to look at is of course the man man to see how the link between man and the actual man pages look, but... well. Thanks again. |
|
|
|
|
|
#6 |
|
Site Admin
Join Date: Jan 2002
Location: Montreal
Posts: 31,940
|
1) Have you made any other configuration changes that would affect the shell? E.g. have you edited any files in /etc ?
2) Try creating a fresh new user account and then log in as that user to see if the problem exists there. 3) If nothing else helps, you could look at what files are opened by the 'man' command - you could do this by running the following command in a different Terminal window while you run the 'man' command: sudo filebyproc.d | grep man
__________________
hayne.net/macosx.html |
|
|
|
|
|
#7 |
|
Hall of Famer
Join Date: Apr 2002
Posts: 3,315
|
I don't have Snow Leopard yet, but i suspect it should be similar to 10.5
What do you get for these two commands? Code:
$ /bin/cat /etc/manpaths /usr/share/man /usr/local/share/man $ /usr/libexec/path_helper PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/Users/halito/bin:/usr/libexec:/usr/X11/bin"; export PATH MANPATH="/usr/share/man:/usr/local/share/man:/usr/X11/man"; export MANPATH EDIT: i s'pose we should look at the (system's) profile too... here's mine: Code:
$ /bin/cat /etc/profile
# System-wide .profile for sh(1)
if [ -x /usr/libexec/path_helper ]; then
eval `/usr/libexec/path_helper -s`
fi
if [ "${BASH-no}" != "no" ]; then
[ -r /etc/bashrc ] && . /etc/bashrc
fi
Last edited by Hal Itosis; 09-13-2009 at 03:07 PM. |
|
|
|
|
|
#8 |
|
Prospect
Join Date: Sep 2009
Posts: 10
|
Thanks for all the suggestions! This is what I've tried so far:
hayne: 1) No, haven't edited any files in /etc or deliberately made any configuration changes - but I saw that some programs I'm using: LaTex, ebiotools etc have created .files in my user directory. 2) I created a new user but with the same result - "No manual entry for xxx". 3) I will try this now. Hal Itosis: The first output is identical to yours: /usr/share/man /usr/local/share/man The second output looks like this: PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin:/opt/local/sbin:/Users/k_markt/molevol/bin:/usr/local/genome/bin:/usr/texbin:/usr/ebiotools/bin"; export PATH; MANPATH="/usr/share/man:/usr/local/share/man:/usr/X11/share/man:/opt/local/share/man:/usr/ebiotools/share/man"; export MANPATH; There are some differences here, should I try to change them? If so, how do I do that? The system's profile output is 30 rows including comments from various software (deleted below): # System-wide .profile for sh(1) PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/genome/bin" export PATH if [ "${BASH-no}" != "no" ]; then [ -r /etc/bashrc ] && . /etc/bashrc fi if [ `whoami` != "root" ] then PATH="$PATH:/usr/texbin" export PATH fi if [ `whoami` != "root" ] then PATH="$PATH:/usr/local/bin" export PATH fi if [ -f "/usr/ebiotools/etc/profile" ]; then source "/usr/ebiotools/etc/profile" "/usr/ebiotools" else echo "Warning: eBioTools was not initialized because the file /usr/ebiotools/etc/profile could not be found. Please correct this by reinstalling eBioTools or editing /etc/profile." fi I do not not know to what extent these differences matter. Do you find any odd things here? |
|
|
|
|
|
#9 |
|
Site Admin
Join Date: Jan 2002
Location: Montreal
Posts: 31,940
|
I'd recommend restoring the system-wide file /etc/profile back to what Apple supplied.
Put any of the modifications needed for those 3rd-party programs into your user's ~/.profile instead. (And write to the developers of those 3rd-party programs and chastise them for changing things system-wide.)
__________________
hayne.net/macosx.html |
|
|
|
|
|
#10 |
|
Prospect
Join Date: Sep 2009
Posts: 10
|
Ok, and how do I do that? And are what Apple supplied what I can see in Hal Itosis' output?
|
|
|
|
|
|
#11 | |||||||||||||||||||||||
|
Hall of Famer
Join Date: Apr 2002
Posts: 3,315
|
That's the stock Apple /etc/profile for Leopard. [i don't have SL yet.] |
|||||||||||||||||||||||
|
|
|
|
|
#12 | |||||||||||||||||||||||
|
Site Admin
Join Date: Jan 2002
Location: Montreal
Posts: 31,940
|
I was hoping that you had a backup (e.g. via Time Machine) of the original /etc/profile file.
__________________
hayne.net/macosx.html |
|||||||||||||||||||||||
|
|
|
|
|
#13 |
|
Prospect
Join Date: Sep 2009
Posts: 10
|
Yes, I do, but I don't know how to restore a file from Time Machine that I can't see in the Aqua interface.
|
|
|
|
|
|
#14 |
|
Site Admin
Join Date: Jan 2002
Location: Montreal
Posts: 31,940
|
You can get to any folder in Finder by using the "Go to Folder" menu item from Finder's "Go" menu, then typing in the path of the folder.
__________________
hayne.net/macosx.html |
|
|
|
|
|
#15 |
|
Prospect
Join Date: Sep 2009
Posts: 10
|
I restored the profile file (identical to the one you showed me above) - and am now browsing some man files. Thanks to you both!
PS. As you advised, I'll try to find a suitable place for the rest of the junk I found in that file. /K |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|