Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I know that installing a package through APT (apt-get or aptitude for my computer) will automatically install the appropriate man pages and update the man database. When I want to build the same packages, however, no man page is installed and I cannot use man for that program. How do I get the man pages for software I have compiled? (I am running Ubuntu 10.10).

share|improve this question
    
Are you trying to build a deb package, or are you compiling then installing with make install? If the former, post your debian/rules. If the latter, explain how you configure the program (did you run ./configure, did you edit the makefile, what variables did you pass to make, etc.). –  Gilles Dec 10 '10 at 0:14
    
I used cmake to configure the program; the command line was cmake ../ -DCMAKE_INSTALL_PREFIX=/usr/local. I then ran make && sudo make install as usual. –  AniDev Dec 10 '10 at 0:57
add comment

1 Answer

up vote 3 down vote accepted

Are you configuring your software build with the default locations (in /usr) and installing as root? (but not building as root i hope). If so, then the man pages, if there are any, should be installed where man can already see them.

If you are installing to a nonstandard location, you need to let man know where they are. You can use the MANPATH environment variable to do this. Set it to the normal man directories, and add your install dir to it as well. Something like export MANPATH=/usr/share/man:/path/to/your/dir

EDIT: Also, I am not sure about the 'man database'. There really isn't one. There are some distributions that do post processing of the man pages, either compress it, or uncompress it. But they don't really keep a list of man pages anywhere. In pseudo code:

for DIR in $MANPATH
    for SEC in $MANSECTIONS (or just the one section if you give as `-s SEC`)
        open dirlist for $DIR/man${SEC}
        in dir list list, look for $COMMAND.$SEC
        if you find it, display and exit

This may be your issue. If you installed to a non-standard dir, is the naming convention right? If you have a file bubba.1, then the file should be installed into some path /path/to/bubba/install/man1/bubba.1 and MANPATH=/usr/share/man:/path/to/bubba/install

share|improve this answer
    
I sometimes configure my software to compile in /usr/local, that could be the problem. I am not compiling as root, but I am installing as root (make; sudo make install). However, I don't think that the man pages are there (I looked in the man8 folder). –  AniDev Dec 9 '10 at 22:57
    
Also, if there is no 'database', how come there are folders for man-db and there is a program called 'mandb'? –  AniDev Dec 9 '10 at 23:03
    
@AniDev: i have no mandb on my system. For my above comment, I ran strace on my man command to see if it hit a db, it did not. I can not say for all versions of man whether or not they use one. –  Rich Homolka Dec 9 '10 at 23:38
    
OK, thanks. Whenever APT installs a package, it almost always says at the end somewhere 'Processing triggers for man-db...'. –  AniDev Dec 10 '10 at 0:47
    
Does not quite answer my question, but helpful nonetheless, so I am marking your answer as my accepted answer. –  AniDev Dec 14 '10 at 21:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.