'man -k' & 'apropos' fail

'man -k' & 'apropos' fail

Post by William Beckn » Tue, 28 Mar 1995 22:22:53



I just installed Slackware 2.2.0 (kernel 1.2.1) this weekend, but I've run
into some trouble...

When the command 'man -k' or 'apropos' is used, the following error
message displays:

fg: no job control
apropos:  manpath is null
Error executing formatting or display command
System command exited with status 256

If I use the 'manpath' command, the contents of the MANPATH variable
_does_ display (it's not null!).

Anyone has a idea what can be done?  I cannot even find the 'fg' command.
Thanks.

--

  ===========================================================================
  William Beckner - System Manager/SysAdmin for the Resource Sharing Alliance
  ---------------------------------------------------------------------------
          "The computer is mightier than the pen, the sword,
           and usually, the programmer."
  ===========================================================================

 
 
 

'man -k' & 'apropos' fail

Post by Andries Brouw » Wed, 29 Mar 1995 01:35:16


: I just installed Slackware 2.2.0 (kernel 1.2.1) this weekend, but I've run
: into some trouble...

: When the command 'man -k' or 'apropos' is used, the following error
: message displays:

: fg: no job control
...

: Anyone has a idea what can be done?

Concerning man, apropos and the like: you might get
sunsite.unc.edu:/pub/Linux/system/Manual-pagers/man-1.4c.tar.gz
and install that.

(You might also retrieve the apropos you had before installing
Slackware 2.2.0. What shell are you running, that doesn't know
about fg?)

 
 
 

'man -k' & 'apropos' fail

Post by Mark A. Stevens » Thu, 30 Mar 1995 04:00:00



: : I just installed Slackware 2.2.0 (kernel 1.2.1) this weekend...

: : When the command 'man -k' or 'apropos' is used, the following error

I have exactly the same problem - apropos thinks the MANPATH is null when
it is not and can't seem to grasp fg.

Perhaps related (I am, as one notices, not a UNIXX guru...) is the
nightly email I get from cron, which I never got until switching from 2.1
to 2.2:



updatedb: new database would be empty

: What shell are you running, that doesn't know
: about fg?)

bash. Obviously, it knows about fg. There's something else going on.

--
       Mark A. Stevens, M.D.           Assistant Professor of Psychiatry

     Galveston, TX  77555-0428      |  Phone: (409) 772-3474
                <URL:http://shrinkatron.utmb.edu/~mstevens>

 
 
 

'man -k' & 'apropos' fail

Post by Mark A. Stevens M » Thu, 30 Mar 1995 04:00:00



Quote:> But what is the text of your apropos file?

I'm afraid I'm too dim to understand your question. I just get those
error messages any time I try 'apropos anything' such as ls or whatever.
I installed Slackware 2.2 over 2.1. Apropos worked before, but doesn't
now. If you can point me to the file to which you're referring, I'll tell
you what's in it.

       Mark A. Stevens, M.D.           Assistant Professor of Psychiatry

     Galveston, TX  77555-0428      |  Phone: (409) 772-3474
                <URL:http://shrinkatron.utmb.edu/~mstevens>

 
 
 

'man -k' & 'apropos' fail

Post by Adam McK » Fri, 31 Mar 1995 04:00:00


Hi all.  I also had problems with this, so I got out my trusty hatchet, and
paid a visit to /usr/bin/apropos.  The result is given below.  Basically, I
just kept hacking at it until it performed as expected on my system.  Your
results may be different.  Look at the 'manpath' assignment near the start,
and change it to suit your system.

If anyone has a better fix please post it!

----------------------- CUT HERE ---------------------

#! /bin/sh
#
# apropos -- search the whatis database for keywords.
#
# Copyright (c) 1990, 1991, John W. Eaton.
#
# You may distribute under the terms of the GNU General Public
# License as specified in the README file that comes with the man
# distribution.  
#
# John W. Eaton

# Department of Chemical Engineering
# The University of Texas at Austin
# Austin, Texas  78712
#
# apropos-1.4 aeb 941007
#
#       *** NOTE: this file has been tampered with
#

# how to avoid hardcoding the following??  manpath=$MANPATH does not work because
# MANPATH is colon-delimited.  Is there a facility in bash to do this kind of
# string manipulation??  would be nice to avoid running a program just to do this
# simple task.
manpath="/usr/local/man /usr/man /usr/man/preformat /usr/X11/man /usr/openwin/man"
PAGER=/usr/bin/less

if [ $# = 0 ]
then
    echo "usage: `basename $0` keyword ..."
    exit 1
fi

if [ "$manpath" = "" ]
then
    echo "apropos: manpath is null"
    exit 1
fi

if [ "$PAGER" = "" ]
then
    PAGER="%pager%"
fi

# avoid using a pager if only output is "nothing appropriate"
nothing=
found=0
while [ $found = 0 -a -n "$1" ]
do
    for d in $manpath /usr/lib
    do
        if [ -f $d/whatis ]
        then
            if grep -is "$1" $d/whatis > /dev/null
            then
                found=1
            fi
        fi
    done
    if [ $found = 0 ]
    then
        nothing="$nothing $1"
        shift
    fi
done

if [ $found = 0 ]
then
    for i in $nothing
    do
        echo "$i: nothing appropriate"
    done
    exit
fi

while [ $1 ]
do
    for i in $nothing
    do
        echo "$i: nothing appropriate"
    done
    nothing=
    found=0
    for d in $manpath /usr/lib
    do
        if [ -f $d/whatis ]
        then
            if grep -i "$1" $d/whatis
            then
                found=1
            fi
        fi
    done

    if [ $found = 0 ]
    then
        echo "$1: nothing appropriate"
    fi

    shift
done | $PAGER

exit

----------------------- CUT HERE ---------------------

Good luck!


 
 
 

'man -k' & 'apropos' fail

Post by Stevers » Sat, 01 Apr 1995 04:00:00


Make sure your "whatis" database has been built.  Refer to the on-line
manual for whatis for more information.

-Steve Coile

 
 
 

'man -k' & 'apropos' fail

Post by joe best » Sat, 01 Apr 1995 04:00:00




Quote:>If appropos, man -k (or whatis) fail then you need to rebuild
>your wahtis database. In each manual directory (/usr/man, /usr/local/man,
>/usr/X11R6/man, etc) there should be a file containing a list of manual
>pages and their short description in ASCIIbetical order. If this file
>is old or corrupted use makewhatis to rebuild it. Note some version of
>makewhatis nuke your existing database when you use makewhatis -u. To fix try

this isn't so with the new slackware apropos.  i just reinstalled the old
apropos, and it works again.  here is a copy, just copy it to /usr/bin, and
set the permissions accordingly:
---
#!/bin/sh
#
# apropos -- search the whatis database for keywords.
#
# Copyright (c) 1990, 1991, John W. Eaton.
#
# You may distribute under the terms of the GNU General Public
# License as specified in the README file that comes with the man
# distribution.  
#
# John W. Eaton

# Department of Chemical Engineering
# The University of Texas at Austin
# Austin, Texas  78712
#
# apropos-1.3 aeb 940331
#

PATH=/usr/local/bin:/bin:/usr/ucb:/usr/bin

libdir=/usr/lib

if [ $# = 0 ]
then
    echo "usage: `basename $0` keyword ..."
    exit 1
fi

manpath=`/usr/bin/man --path | tr : '\040'`

if [ "$manpath" = "" ]
then
    echo "whatis: manpath is null"
    exit 1
fi

if [ "$PAGER" = "" ]
then
    PAGER="/usr/bin/less -s"
fi

while [ $1 ]
do
    found=0
    for d in $manpath /usr/lib
    do
        if [ -f $d/whatis ]
        then
            grep -i "$1" $d/whatis
            status=$?
            if [ "$status" = "0" ]
            then
                found=1
                export found
            fi
        fi
    done

    if [ "$found" = "0" ]
    then
        echo "$1: nothing appropriate"
    fi

    shift
done | $PAGER

exit
---

 
 
 

'man -k' & 'apropos' fail

Post by Joel L. Seber ... CH2 » Sat, 01 Apr 1995 04:00:00





> : : I just installed Slackware 2.2.0 (kernel 1.2.1) this weekend...

> : : When the command 'man -k' or 'apropos' is used, the following error

> I have exactly the same problem - apropos thinks the MANPATH is null when
> it is not and can't seem to grasp fg.

I am having this problem also.  Anyone have ideas on this?

Joel L. Seber                           | Dry humor is wasted around here.
SUN Workstation Laboratory Manager      |                 -Joel L. Seber
Center for Manufacturing Research       |
      and Technology Utilization        | recursive, adj.
Tennessee Technological University      |     See 'recursive'
Box 5077 Brown Hall                     |
Cookeville, TN  38505                   | What if there were no hypothetical

more info:                              |

 
 
 

'man -k' & 'apropos' fail

Post by Andries Brouw » Sat, 01 Apr 1995 04:00:00


: Hi all.  I also had problems with this, so I got out my trusty hatchet, and
: paid a visit to /usr/bin/apropos.  The result is given below.
: If anyone has a better fix please post it!

...
: if [ "$PAGER" = "" ]
: then
:     PAGER="%pager%"
: fi
...

The better fix is to get man-1.4c from sunsite or your favourite
mirror, and install it. The above fragment leads one to suspect
that not apropos, but apropos.sh got installed in the
Slackware /usr/bin.
[A correct /usr/bin/apropos does not contain any % signs.]

 
 
 

'man -k' & 'apropos' fail

Post by Mark A. Stevens M » Sun, 02 Apr 1995 04:00:00



Quote:> In comp.os.linux.setup you write:

> ::  But what is the text of your apropos file?

> : now. If you can point me to the file to which you're referring, I'll tell

> /usr/bin/apropos

I had assumed that /usr/bin/apropos is a binary file, not a text file.
Now that I know better, I think I can edit it appropriately. Thanks.

       Mark A. Stevens, M.D.           Assistant Professor of Psychiatry

     Galveston, TX  77555-0428      |  Phone: (409) 772-3474
                <URL:http://shrinkatron.utmb.edu/~mstevens>

 
 
 

'man -k' & 'apropos' fail

Post by Brian McIlwra » Wed, 05 Apr 1995 04:00:00



: If appropos, man -k (or whatis) fail then you need to rebuild
: your wahtis database. In each manual directory (/usr/man, /usr/local/man,

No!!! apropos is REALLY broken in Slackware 2.2. As man -k just invokes
apropos it is also broken.
I copiued the apropos back from Slackware 2.1 and all was well again. The
whatis dateabase is fine.

Brian McIlwrath
Rutherford Appleton Laboratory,
Chilton, Didcot, Oxon, UK.

 
 
 

'man -k' & 'apropos' fail

Post by Brian McIlwra » Fri, 07 Apr 1995 04:00:00


: No!!! apropos is REALLY broken in Slackware 2.2. As man -k just invokes
: apropos it is also broken.

I have had some requests from people who no longer have access to the working
copy of /usr/bin/apropos. For anyone else who needs it here it is:

#!/bin/sh
#
# apropos -- search the whatis database for keywords.
#
# Copyright (c) 1990, 1991, John W. Eaton.
#
# You may distribute under the terms of the GNU General Public
# License as specified in the README file that comes with the man
# distribution.  
#
# John W. Eaton

# Department of Chemical Engineering
# The University of Texas at Austin
# Austin, Texas  78712
#
# apropos-1.3 aeb 940331
#

PATH=/usr/local/bin:/bin:/usr/ucb:/usr/bin

libdir=/usr/lib

if [ $# = 0 ]
then
    echo "usage: `basename $0` keyword ..."
    exit 1
fi

manpath=`/usr/bin/man --path | tr : '\040'`

if [ "$manpath" = "" ]
then
    echo "whatis: manpath is null"
    exit 1
fi

if [ "$PAGER" = "" ]
then
    PAGER="/usr/bin/less -s"
fi

while [ $1 ]
do
    found=0
    for d in $manpath /usr/lib
    do
        if [ -f $d/whatis ]
        then
            grep -i "$1" $d/whatis
            status=$?
            if [ "$status" = "0" ]
            then
                found=1
                export found
            fi
        fi
    done

    if [ "$found" = "0" ]
    then
        echo "$1: nothing appropriate"
    fi

    shift
done | $PAGER

exit

 
 
 

'man -k' & 'apropos' fail

Post by Zenon Fortu » Fri, 07 Apr 1995 04:00:00





>> In comp.os.linux.setup you write:

>> ::  But what is the text of your apropos file?

>> : now. If you can point me to the file to which you're referring, I'll tell

>> /usr/bin/apropos

>I had assumed that /usr/bin/apropos is a binary file, not a text file.
>Now that I know better, I think I can edit it appropriately. Thanks.

The "apropos" script has been corrected in Slackware 2.2.0.1
I have placed the extracted, corrected version in

        ftp.netcom.com:/pub/ze/zenon/linux/tmp

                -Zenon

 
 
 

1. man pages for 'fread' & 'fwrite'

I'm not sure who maintains the man pages for Linux, but those for fread and
fwrite wrongly describe the return values.

The functions take a size parameter and a number-of-elements parameter.
They return the NUMBER OF ELEMENTS read or written, NOT the number of
characters.

Karl

-------------------------------------------------------------------------
Vitrociset S.p.A.                               Tel   : +(49) 6151 902041
European Space Agency                           Fax   : +(49) 6151 904041

2. e2fsck 0.5a -> error: Block bitmap nn for group yy not in group

3. 'apropos' and 'makewhatis'..

4. minicom and permissions

5. 'info' displays hyphens in man pages as '^i' instead of '-'

6. A startup question (Please forgive me. I'm a newbie)

7. How to refresh 'apropos' when installing new man pages?

8. Help! Slackware Recompile/Make fails.

9. What is 'stty', 'term' & 'tty'

10. ? Red Hat 6.1 'apropos' don't work.

11. Unix's 'rz' & 'sz'

12. cvsup doesn't like tags 'ports-all' & 'doc-all'

13. Want bash '&' to behave like csh '&'