You are not logged in.

#1 2010-08-03 16:32:54

cory.schwartz
Member
Registered: 2010-06-13
Posts: 11

Is 'man' broken?

I can lookup man pages, but I can't do any of the other features. Teach me something, forum readers. What is causing this?

In this example, I'm trying to find out about gcc, the C compiler.

I have gcc installed:

$ pacman -Qs compiler
local/gcc 4.5.0-6 (base-devel)
    The GNU Compiler Collection
local/lib32-gcc-libs 4.5.0-6 (lib32)
    The GNU Compiler Collection
local/mono 2.6.4-2
    Free implementation of the .NET platform including runtime and compiler
local/orc 0.4.6-1
    The Oild Runtime Compiler

and I can look up the man page for gcc as well.
but this is broken:

$ apropos compiler
compiler: nothing appropriate.

$ whatis gcc
gcc: nothing appropriate.

Here is the contents of my man configuration. What am I doing wrong? (this is the default, I didn't change anything in this file)

$ 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

Thanks, one and all.

Offline

#2 2010-08-03 16:37:35

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: Is 'man' broken?

cory.schwartz wrote:
$ apropos compiler
compiler: nothing appropriate.

$ whatis gcc
gcc: nothing appropriate.

That's what's supposed to happen. I think both of those commands require more input.

man apropos
man whatis

Offline

#3 2010-08-03 16:41:32

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Is 'man' broken?

[karol@black ~]$ whatis gcc
gcc (1)              - GNU project C and C++ compiler
[karol@black ~]$ apropos compiler
B (3perl)            - The Perl Compiler
B::Deparse (3perl)   - Perl compiler backend to produce perl code
compile_et (1)       - error table compiler
fort77 (1p)          - FORTRAN compiler (FORTRAN)
g++ (1)              - GNU project C and C++ compiler
gcc (1)              - GNU project C and C++ compiler
List::Util::XS (3perl) - Indicate if List::Util was compiled with a C compiler
luac (1)             - Lua compiler
mk_cmds (1)          - error table compiler
O (3perl)            - Generic interface to Perl Compiler backends
OPENSSL_Applink (3)  - glue between OpenSSL BIO and Win32 compiler run-time
pcap-config (1)      - write libpcap compiler and linker flags to standard output
perlcompile (1perl)  - Introduction to the Perl Compiler-Translator
tic (1m)             - the terminfo entry-description compiler
uil (1)              - compiler
xft-config (1)       - report Xft version, compiler, linker, and/or installation directory information
xsubpp (1perl)       - compiler to convert Perl XS code into C code
yacc (1p)            - yet another compiler compiler (DEVELOPMENT)
zic (8)              - timezone compiler

works for me.

Offline

#4 2010-08-03 16:45:16

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: Is 'man' broken?

karol wrote:

works for me.

Oh, then I apparently have this problem as well. hmm

Offline

#5 2010-08-03 17:08:42

jac
Member
From: /home/jac
Registered: 2009-05-19
Posts: 431
Website

Re: Is 'man' broken?

I think on the live CD you have to run mandb to get apropos to work. You should have a daily cron job to do this, but perhaps it is failing. I would try running mandb as root to see if that fixes it and go from there.
(Disclaimer: I'm pretty sure I only know this from random reading/experimenting, so this process might be wrong. Also, mandb is io intensive)

Last edited by jac (2010-08-03 17:08:51)

Offline

Board footer

Powered by FluxBB