Closed jaja360 closed 5 years ago
I failed reproduce this behavior on ubuntu16.04, which Linux distribution are you using?
Can you show us the result from man --path
? It gives us the order of search directories.
The output of man --path
is
/home/jaja27/.local/share/man:/usr/local/man:/usr/local/share/man:/usr/share/man
that is interesting and unexpected. man --path
shows on my machine
/usr/local/man:/usr/local/share/man:/usr/share/man:/home/sgssgene/.local/share/man
you can see that the /home/sgssgene/.local/share/man
folder is the last, and not like in your case the first entry. man
searches in the order of these path for a documentation. This is the reason why for you cppman
"overwrites" the normal man results, but in my case it doesn't.
Now we have to find where it goes wrong, which is really anoying.
You should check
~/.manpath
- It my case it has the content:
MANDATORY_MANPATH /home/sgssgene/.local/share/man
$MANPATH
you can check by running echo $MANPATH
, it should output just an empty line (MANPATH is normally empty). If this is not the case you should check ~/.bashrc
or ~/.profile
for any entries setting MANPATH.Not sure if it is related, but after running a sudo apt update
and restart of the computer, the man --path
now shows the correct order:
/usr/local/man:/usr/local/share/man:/usr/share/man:/home/jaja27/.local/share/man
The last updated packages were some new linux kernel (version 4.18.0-13.14). I'm on ubuntu 18.10.
I also tried to reproduce the problem on another computer, also on ubuntu 18.10, but failed to reproduce. The other computer already had the latest linux kernel. So I can't know for sure, but I guess the last update changed something to man
and fixed the order of man --path
.
Good that it works now. I checked https://launchpad.net/ubuntu/+source/man-db/+changelog but couldn't find any clue to what happened.
Since it is not reproducible I think this ticket should be closed and reopened when this issue appears again.
@aitjcize I think only you can close this issue.
@SGSSGene thanks for triaging the issue and all the paste contributions!
I did the
cppman -m true
command to be able to use theman
command to view c++ man pages. However, I noticed that some pages related to C have been replaced by the version coming from cplusplus.comFor example, the strtok "normal" man page is no longer available. With
man strtok
, I get the cplusplus.com version.Is there a way to add only the man pages specific to C++, and keep the man pages of C functions as they were before ?