You are not logged in.
Pages: 1
Topic closed
Every time I try using the man command, I don't get a manual page. I get no output. I tried reinstalling man and nothing works.
*******@arch-lt ~ $ man ls
*******@arch-lt ~ $ man man
*******@arch-lt ~ $ man cat
*******@arch-lt ~ $
Any help would be appreciated. Thank you.
Last edited by nvndk (2013-05-05 01:48:48)
Offline
Interesting. First, what if you prepend a '\' to the man command. i.e. \man man
Next, look at the excerpt from the man page below: (I include it here, because you cannot see it yourself)
ENVIRONMENT
MANPATH
If $MANPATH is set, its value is used as the path to search for
manual pages.
MANROFFOPT
The contents of $MANROFFOPT are added to the command line every
time man invokes the formatter (nroff, troff, or groff).
MANROFFSEQ
If $MANROFFSEQ is set, its value is used to determine the set of
preprocessors to pass each manual page through. The default
preprocessor list is system dependent.
MANSECT
If $MANSECT is set, its value is a colon-delimited list of sec-
tions and it is used to determine which manual sections to
search and in what order.
MANPAGER, PAGER
If $MANPAGER or $PAGER is set ($MANPAGER is used in preference),
its value is used as the name of the program used to display the
manual page. By default, less -s is used.
The value may be a simple command name or a command with argu-
ments, and may use shell quoting (backslashes, single quotes, or
double quotes). It may not use pipes to connect multiple com-
mands; if you need that, use a wrapper script, which may take
the file to display either as an argument or on standard input.
MANLESS
If $MANLESS is set, man will not perform any of its usual pro-
cessing to set up a prompt string for the less pager. Instead,
the value of $MANLESS will be copied verbatim into $LESS. For
example, if you want to set the prompt string unconditionally to
"my prompt string", set $MANLESS to `-Psmy prompt string'.
BROWSER
If $BROWSER is set, its value is a colon-delimited list of com-
mands, each of which in turn is used to try to start a web
browser for man --html. In each command, %s is replaced by a
filename containing the HTML output from groff, %% is replaced
by a single percent sign (%), and %c is replaced by a colon (:).
SYSTEM If $SYSTEM is set, it will have the same effect as if it had
been specified as the argument to the -m option.
MANOPT If $MANOPT is set, it will be parsed prior to man's command line
and is expected to be in a similar format. As all of the other
man specific environment variables can be expressed as command
line options, and are thus candidates for being included in
$MANOPT it is expected that they will become obsolete. N.B. All
spaces that should be interpreted as part of an option's argu-
ment must be escaped.
MANWIDTH
If $MANWIDTH is set, its value is used as the line length for
which manual pages should be formatted. If it is not set, man-
ual pages will be formatted with a line length appropriate to
the current terminal (using an ioctl(2) if available, the value
of $COLUMNS, or falling back to 80 characters if neither is
available). Cat pages will only be saved when the default for-
matting can be used, that is when the terminal line length is
between 66 and 80 characters.
MAN_KEEP_FORMATTING
Normally, when output is not being directed to a terminal (such
as to a file or a pipe), formatting characters are discarded to
make it easier to read the result without special tools. How-
ever, if $MAN_KEEP_FORMATTING is set to any non-empty value,
these formatting characters are retained. This may be useful
for wrappers around man that can interpret formatting charac-
ters.
MAN_KEEP_STDERR
Normally, when output is being directed to a terminal (usually
to a pager), any error output from the command used to produce
formatted versions of manual pages is discarded to avoid inter-
fering with the pager's display. Programs such as groff often
produce relatively minor error messages about typographical
problems such as poor alignment, which are unsightly and gener-
ally confusing when displayed along with the manual page. How-
ever, some users want to see them anyway, so, if
$MAN_KEEP_STDERR is set to any non-empty value, error output
will be displayed as usual.
LANG, LC_MESSAGES
Depending on system and implementation, either or both of $LANG
and $LC_MESSAGES will be interrogated for the current message
locale. man will display its messages in that locale (if avail-
able). See setlocale(3) for precise details.
FILES
/etc/man_db.conf
man-db configuration file.
/usr/share/man
A global manual page hierarchy.
/usr/share/man/index.(bt|db|dir|pag)
A traditional global index database cache.
/var/cache/man/index.(bt|db|dir|pag)
An FHS compliant global index database cache.
Look through the environmental variables and the related files and directories from that excerpt, and see if they look sane.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Odd. To get some context, can you provide the output from the following commands:
man --version
uname -a
ls -l /usr/share/man/man1/ls.*
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
What's the output of 'type -p man'?
Offline
@ewaller
Here is my manpath:
$ manpath
/usr/local/man:/usr/local/share/man:/usr/share/man
All the other environment are not set.
My man_db.conf seems normal to me. Take a look:
$ cat /etc/man_db.conf
# gdbm
#
# This file is used by the man-db package to configure the man and cat paths.
# It is also used to provide a manpath for those without one by examining
# their PATH environment variable. For details see the manpath(5) man page.
#
# Lines beginning with `#' are comments and are ignored. Any combination of
# tabs or spaces may be used as `whitespace' separators.
#
# There are three mappings allowed in this file:
# --------------------------------------------------------
# MANDATORY_MANPATH manpath_element
# MANPATH_MAP path_element manpath_element
# MANDB_MAP global_manpath [relative_catpath]
#---------------------------------------------------------
# every automatically generated MANPATH includes these fields
#
#MANDATORY_MANPATH /usr/src/pvm3/man
#
MANDATORY_MANPATH /usr/man
MANDATORY_MANPATH /usr/share/man
MANDATORY_MANPATH /usr/local/share/man
#---------------------------------------------------------
# set up PATH to MANPATH mapping
# ie. what man tree holds man pages for what binary directory.
#
# *PATH* -> *MANPATH*
#
MANPATH_MAP /bin /usr/share/man
MANPATH_MAP /usr/bin /usr/share/man
MANPATH_MAP /sbin /usr/share/man
MANPATH_MAP /usr/sbin /usr/share/man
MANPATH_MAP /usr/local/bin /usr/local/man
MANPATH_MAP /usr/local/bin /usr/local/share/man
MANPATH_MAP /usr/local/sbin /usr/local/man
MANPATH_MAP /usr/local/sbin /usr/local/share/man
MANPATH_MAP /usr/X11R6/bin /usr/X11R6/man
MANPATH_MAP /usr/bin/X11 /usr/X11R6/man
MANPATH_MAP /usr/games /usr/share/man
MANPATH_MAP /opt/bin /opt/man
MANPATH_MAP /opt/sbin /opt/man
#---------------------------------------------------------
# For a manpath element to be treated as a system manpath (as most of those
# above should normally be), it must be mentioned below. Each line may have
# an optional extra string indicating the catpath associated with the
# manpath. If no catpath string is used, the catpath will default to the
# given manpath.
#
# You *must* provide all system manpaths, including manpaths for alternate
# operating systems, locale specific manpaths, and combinations of both, if
# they exist, otherwise the permissions of the user running man/mandb will
# be used to manipulate the manual pages. Also, mandb will not initialise
# the database cache for any manpaths not mentioned below unless explicitly
# requested to do so.
#
# In a per-user configuration file, this directive only controls the
# location of catpaths and the creation of database caches; it has no effect
# on privileges.
#
# Any manpaths that are subdirectories of other manpaths must be mentioned
# *before* the containing manpath. E.g. /usr/man/preformat must be listed
# before /usr/man.
#
# *MANPATH* -> *CATPATH*
#
MANDB_MAP /usr/man /var/cache/man/fsstnd
MANDB_MAP /usr/share/man /var/cache/man
MANDB_MAP /usr/local/man /var/cache/man/oldlocal
MANDB_MAP /usr/local/share/man /var/cache/man/local
MANDB_MAP /usr/X11R6/man /var/cache/man/X11R6
MANDB_MAP /opt/man /var/cache/man/opt
#
#---------------------------------------------------------
# Program definitions. These are commented out by default as the value
# of the definition is already the default. To change: uncomment a
# definition and modify it.
#
#DEFINE pager less -s
#DEFINE cat cat
#DEFINE tr tr '\255\267\264\327' '\055\157\047\170'
#DEFINE grep grep
#DEFINE troff groff -mandoc
#DEFINE nroff nroff -mandoc
#DEFINE eqn eqn
#DEFINE neqn neqn
#DEFINE tbl tbl
#DEFINE col col
#DEFINE vgrind
#DEFINE refer refer
#DEFINE grap
#DEFINE pic pic -S
#
#DEFINE compressor gzip -c7
#---------------------------------------------------------
# Misc definitions: same as program definitions above.
#
#DEFINE whatis_grep_flags -i
#DEFINE apropos_grep_flags -iEw
#DEFINE apropos_regex_grep_flags -iE
#---------------------------------------------------------
# Section names. Manual sections will be searched in the order listed here;
# the default is 1, n, l, 8, 3, 0, 2, 5, 4, 9, 6, 7. Multiple SECTION
# directives may be given for clarity, and will be concatenated together in
# the expected way.
# If a particular extension is not in this list (say, 1mh), it will be
# displayed with the rest of the section it belongs to. The effect of this
# is that you only need to explicitly list extensions if you want to force a
# particular order. Sections with extensions should usually be adjacent to
# their main section (e.g. "1 1mh 8 ...").
#
SECTION 1 n l 8 3 0 2 5 4 9 6 7
#
#---------------------------------------------------------
# Range of terminal widths permitted when displaying cat pages. If the
# terminal falls outside this range, cat pages will not be created (if
# missing) or displayed.
#
#MINCATWIDTH 80
#MAXCATWIDTH 80
#
# If CATWIDTH is set to a non-zero number, cat pages will always be
# formatted for a terminal of the given width, regardless of the width of
# the terminal actually being used. This should generally be within the
# range set by MINCATWIDTH and MAXCATWIDTH.
#
#CATWIDTH 0
#
#---------------------------------------------------------
# Flags.
# NOCACHE keeps man from creating cat pages.
#NOCACHE
The files in /usr/share/man seem normal. Not sure if anything is missing.
$ ls -l /usr/share/man
total 1132
drwxr-xr-x 3 root root 4096 Mar 30 10:28 ar
drwxr-xr-x 3 root root 4096 Mar 30 10:28 ast
drwxr-xr-x 3 root root 4096 Mar 30 10:28 be
drwxr-xr-x 3 root root 4096 Mar 30 10:28 bg
drwxr-xr-x 3 root root 4096 Mar 30 10:28 bn
drwxr-xr-x 3 root root 4096 Mar 30 10:28 bo
drwxr-xr-x 3 root root 4096 Mar 30 10:28 bs
drwxr-xr-x 3 root root 4096 Mar 30 10:28 ca
drwxr-xr-x 3 root root 4096 Mar 30 10:28 ca@valencia
drwxr-xr-x 5 root root 4096 Mar 20 18:13 cs
drwxr-xr-x 3 root root 4096 Mar 30 10:28 cy
drwxr-xr-x 5 root root 4096 Mar 20 18:13 da
drwxr-xr-x 6 root root 4096 Mar 20 18:13 de
drwxr-xr-x 3 root root 4096 Apr 22 05:30 de.UTF-8
drwxr-xr-x 3 root root 4096 Mar 30 10:28 el
drwxr-xr-x 3 root root 4096 Mar 30 10:28 en_AU
drwxr-xr-x 3 root root 4096 Mar 30 10:28 en_GB
drwxr-xr-x 3 root root 4096 Mar 30 10:28 eo
drwxr-xr-x 5 root root 4096 Mar 16 16:39 es
drwxr-xr-x 3 root root 4096 Mar 30 10:28 et
drwxr-xr-x 3 root root 4096 Mar 30 10:28 eu
drwxr-xr-x 3 root root 4096 Mar 30 10:28 fa
drwxr-xr-x 3 root root 4096 Mar 30 10:28 fi
drwxr-xr-x 3 root root 4096 Mar 30 10:28 fo
drwxr-xr-x 6 root root 4096 Mar 20 18:13 fr
drwxr-xr-x 3 root root 4096 Apr 22 05:30 fr.UTF-8
drwxr-xr-x 3 root root 4096 Mar 30 10:28 fy
drwxr-xr-x 3 root root 4096 Mar 30 10:28 gd
drwxr-xr-x 3 root root 4096 Mar 30 10:28 gl
drwxr-xr-x 3 root root 4096 Mar 30 10:28 he
drwxr-xr-x 3 root root 4096 Mar 30 10:28 hi
drwxr-xr-x 3 root root 4096 Mar 30 10:28 hr
drwxr-xr-x 6 root root 4096 Mar 20 18:13 hu
drwxr-xr-x 4 root root 4096 Mar 30 12:04 id
drwxr-xr-x 3 root root 4096 Mar 30 10:28 io
drwxr-xr-x 6 root root 4096 Mar 20 18:13 it
drwxr-xr-x 5 root root 4096 Mar 20 18:13 ja
drwxr-xr-x 3 root root 4096 Jan 8 05:57 jp
drwxr-xr-x 3 root root 4096 Mar 30 10:28 kk
drwxr-xr-x 3 root root 4096 Mar 30 10:28 km
drwxr-xr-x 4 root root 4096 Mar 20 18:13 ko
drwxr-xr-x 3 root root 4096 Mar 30 10:28 ku
drwxr-xr-x 3 root root 4096 Mar 30 10:28 lt
drwxr-xr-x 3 root root 4096 Mar 30 10:28 lv
drwxr-xr-x 2 root root 4096 Apr 20 14:21 man0
drwxr-xr-x 2 root root 73728 May 3 16:50 man1
drwxr-xr-x 2 root root 20480 Apr 20 14:21 man2
drwxr-xr-x 2 root root 671744 May 2 22:50 man3
drwxr-xr-x 2 root root 4096 Apr 20 14:21 man4
drwxr-xr-x 2 root root 12288 May 3 16:50 man5
drwxr-xr-x 2 root root 4096 Apr 28 15:37 man6
drwxr-xr-x 2 root root 12288 May 3 16:10 man7
drwxr-xr-x 2 root root 32768 May 3 16:50 man8
drwxr-xr-x 3 root root 4096 Mar 30 10:28 ml
drwxr-xr-x 3 root root 4096 Mar 30 10:28 ms
drwxr-xr-x 3 root root 4096 Mar 30 10:28 my
drwxr-xr-x 3 root root 4096 Mar 30 10:28 nb
drwxr-xr-x 3 root root 4096 Jun 4 2012 nl
drwxr-xr-x 3 root root 4096 Mar 30 10:28 nn
drwxr-xr-x 3 root root 4096 Mar 30 10:28 oc
drwxr-xr-x 3 root root 4096 Mar 30 10:28 pa
drwxr-xr-x 6 root root 4096 Mar 20 18:13 pl
drwxr-xr-x 3 root root 4096 Apr 22 05:30 pl.UTF-8
drwxr-xr-x 3 root root 4096 Mar 30 10:28 ps
drwxr-xr-x 3 root root 4096 Mar 30 10:28 pt
drwxr-xr-x 5 root root 4096 Mar 20 18:13 pt_BR
drwxr-xr-x 3 root root 4096 Mar 30 10:28 ro
drwxr-xr-x 6 root root 4096 Mar 20 18:13 ru
drwxr-xr-x 3 root root 4096 Mar 30 10:28 shn
drwxr-xr-x 3 root root 4096 Mar 30 10:28 si
drwxr-xr-x 3 root root 4096 Mar 30 10:28 sk
drwxr-xr-x 4 root root 4096 Mar 30 12:04 sl
drwxr-xr-x 3 root root 4096 Mar 30 10:28 sq
drwxr-xr-x 3 root root 4096 Mar 30 10:28 sr
drwxr-xr-x 6 root root 4096 Mar 20 18:13 sv
drwxr-xr-x 3 root root 4096 Mar 30 10:28 ta
drwxr-xr-x 3 root root 4096 Mar 30 10:28 te
drwxr-xr-x 3 root root 4096 Mar 30 10:28 th
drwxr-xr-x 5 root root 4096 Mar 20 18:13 tr
drwxr-xr-x 3 root root 4096 Mar 30 10:28 ug
drwxr-xr-x 3 root root 4096 Mar 30 10:28 uk
drwxr-xr-x 3 root root 4096 Mar 30 10:28 uz
drwxr-xr-x 3 root root 4096 Mar 30 10:28 vi
drwxr-xr-x 6 root root 4096 Mar 20 18:13 zh_CN
drwxr-xr-x 3 root root 4096 Mar 30 10:28 zh_HK
drwxr-xr-x 5 root root 4096 Mar 30 12:04 zh_TW
I don't have any index.* files in /usr/share/man/ or /var/cache/man/index.*
@Trilby
$ man --version
man 2.6.3
$ uname -a
Linux arch-lt 3.8.11-1-ck #1 SMP PREEMPT Thu May 2 10:16:03 EDT 2013 x86_64 GNU/Linux
$ ls -l /usr/share/man/man1/ls.*
-rw-r--r-- 1 root root 3143 Feb 16 03:34 /usr/share/man/man1/ls.1.gz
-rw-r--r-- 1 root root 8156 Apr 19 11:24 /usr/share/man/man1/ls.1p.gz
$
@karol
I get no output.
$ type -p man
$
Last edited by nvndk (2013-05-04 01:11:33)
Offline
and prepending a \ to prevent it being interpreted as an alias?
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Forgot about that. Doing \man man or anything gives me no output. Just like doing "man man" or similar.
Last edited by nvndk (2013-05-04 06:45:54)
Offline
Can you manually view a man page using:
man /path/to/manpage
Offline
What pager are you using?
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
I'm waiting for Karol's follow-up as the 'type' check is new to me. But looking into it, it seems since there was no output from `type -p man` that the problem is that the shell doesn't know what to do with the man command, not some pager issue.
Does `/usr/bin/man ls` work?
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I'm waiting for Karol's follow-up as the 'type' check is new to me. But looking into it, it seems since there was no output from `type -p man` that the problem is that the shell doesn't know what to do with the man command, not some pager issue.
I'm not sure, 'man --version' does work.
Last edited by karol (2013-05-04 10:42:23)
Offline
True, forgot about that. Very odd.
EDIT: OP, is this in bash or some other shell? If not bash, does `type man` (no -p flag) return anything? And if bash, `type -t man`? longshot hypothesis: `type -t man` will return "function" as there is a function named man somewhere. I just put an empty man function in my bashrc and replicated this behavior along with the result of every diagnostic test so far. The slash to avoid aliases does not avoid functions.
EDIT2: oops, the man function wouldn't return a version number ... unless this was a very creative and deviously written function to respond to some flags but not actually show man pages. Still my above mentioned diagnostics may still shed light.
Last edited by Trilby (2013-05-04 10:55:10)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
What pager are you using?
This seems logical to me. If I set PAGER to e.g. /usr/bin/true, I get the exact same behavior as the OP
EDIT: No, I don't.. 'type -p man' does of course still output something. Sorry for missing that
Last edited by derhamster (2013-05-04 12:21:07)
Offline
I just did "type -p man" again and got something.
$ type -p man
/usr/bin/man
$
And using the -t argument i get:
$ type -t man
file
$
I did reinstall man-pages (again). I have no PAGER set as an environment variable. Not sure how else to check. I am using bash. I did have a man function for colored output but It's commented out in my .bashrc.
"/usr/bin/man ls" gives me no output
$ /usr/bin/man ls
$
Offline
I fixed it. I just ran
sudo mandb
And now I can now read man pages.
I remember seeing the command while searching online on how to fix this. Read what it was and saw that it updates or creates manual page index caches and just gave it a shot. So now it works perfectly. I'm gonna give it some more time before I mark this thread as solved. Just to make sure that this fix sticks.
Offline
Have you previously done this when reinstalling man-db?
Last edited by karol (2013-05-04 19:24:08)
Offline
I never reinstalled man-db so I never did this before.
Offline
man is provided by man-db :-)
You wrote
I tried reinstalling man and nothing works.
and I thought you meant man-db.
Oh well, let's hope this fixed it.
Offline
Oh yea.. I do remember reinstalling man-db. I just never executed the mandb command afterwards. You were right, I just forgot that when doing "pacman -S man" returns man-db. I just didn't realize that man is associated with man-db.
Offline
There are other solutions.
1. You should declare the variable $PAGER
$ vim .bash_profile
export PAGER=cat
Now try the command that you want.
$ man sleep
2. Run the command "man" as following:
$ man -P cat sleep
-
Last edited by eebv (2025-02-04 19:34:23)
Offline
Please do not necrobump old solved topics.
https://wiki.archlinux.org/title/Genera … bumping%22
Closing.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Pages: 1
Topic closed