![man 不显示手册页;如果“mandb -c”无法解决问题,该怎么办?](https://linux22.com/image/910765/man%20%E4%B8%8D%E6%98%BE%E7%A4%BA%E6%89%8B%E5%86%8C%E9%A1%B5%EF%BC%9B%E5%A6%82%E6%9E%9C%E2%80%9Cmandb%20-c%E2%80%9D%E6%97%A0%E6%B3%95%E8%A7%A3%E5%86%B3%E9%97%AE%E9%A2%98%EF%BC%8C%E8%AF%A5%E6%80%8E%E4%B9%88%E5%8A%9E%EF%BC%9F.png)
我有一个 Ubuntu 18.04.2 LTS 系统,它不会显示手册页。
# man man || echo fail
#
这个 AskUbuntu 问题建议我尝试跑步mandb -c
。
mandb -c
运行成功完成,但有一些警告:
# time mandb -c; echo $?
Processing manual pages under /usr/share/man...
Updating index cache for path `/usr/share/man/man3'. Wait...mandb: warning: /usr/share/man/man3/pcredemo.3.gz: whatis parse for pcredemo(3) failed
Updating index cache for path `/usr/share/man/man6'. Wait...done.
Checking for stray cats under /usr/share/man...
Checking for stray cats under /var/cache/man...
Processing manual pages under /usr/share/man/de...
Updating index cache for path `/usr/share/man/de/man5'. Wait...done.
Checking for stray cats under /usr/share/man/de...
Checking for stray cats under /var/cache/man/de...
Processing manual pages under /usr/share/man/fi...
Updating index cache for path `/usr/share/man/fi/man1'. Wait...done.
Checking for stray cats under /usr/share/man/fi...
Checking for stray cats under /var/cache/man/fi...
Processing manual pages under /usr/share/man/zh_CN...
Updating index cache for path `/usr/share/man/zh_CN/man5'. Wait...done.
Checking for stray cats under /usr/share/man/zh_CN...
Checking for stray cats under /var/cache/man/zh_CN...
Processing manual pages under /usr/share/man/nl...
Updating index cache for path `/usr/share/man/nl/man5'. Wait...done.
Checking for stray cats under /usr/share/man/nl...
Checking for stray cats under /var/cache/man/nl...
Processing manual pages under /usr/share/man/hu...
Updating index cache for path `/usr/share/man/hu/man5'. Wait...done.
Checking for stray cats under /usr/share/man/hu...
Checking for stray cats under /var/cache/man/hu...
Processing manual pages under /usr/share/man/it...
Updating index cache for path `/usr/share/man/it/man5'. Wait...done.
Checking for stray cats under /usr/share/man/it...
Checking for stray cats under /var/cache/man/it...
Processing manual pages under /usr/share/man/da...
Updating index cache for path `/usr/share/man/da/man5'. Wait...done.
Checking for stray cats under /usr/share/man/da...
Checking for stray cats under /var/cache/man/da...
Processing manual pages under /usr/share/man/sv...
Updating index cache for path `/usr/share/man/sv/man5'. Wait...done.
Checking for stray cats under /usr/share/man/sv...
Checking for stray cats under /var/cache/man/sv...
Processing manual pages under /usr/share/man/sr...
Updating index cache for path `/usr/share/man/sr/man5'. Wait...done.
Checking for stray cats under /usr/share/man/sr...
Checking for stray cats under /var/cache/man/sr...
Processing manual pages under /usr/share/man/cs...
Updating index cache for path `/usr/share/man/cs/man1'. Wait...mandb: warning: /usr/share/man/cs/man1/sensible-editor.1.gz: whatis parse for sensible-editor(1) failed
Updating index cache for path `/usr/share/man/cs/man5'. Wait...done.
Checking for stray cats under /usr/share/man/cs...
Checking for stray cats under /var/cache/man/cs...
Processing manual pages under /usr/share/man/ja...
Updating index cache for path `/usr/share/man/ja/man5'. Wait...done.
Checking for stray cats under /usr/share/man/ja...
Checking for stray cats under /var/cache/man/ja...
Processing manual pages under /usr/share/man/ko...
Updating index cache for path `/usr/share/man/ko/man5'. Wait...done.
Checking for stray cats under /usr/share/man/ko...
Checking for stray cats under /var/cache/man/ko...
Processing manual pages under /usr/share/man/fr...
Updating index cache for path `/usr/share/man/fr/man5'. Wait...done.
Checking for stray cats under /usr/share/man/fr...
Checking for stray cats under /var/cache/man/fr...
Processing manual pages under /usr/share/man/zh_TW...
Updating index cache for path `/usr/share/man/zh_TW/man5'. Wait...done.
Checking for stray cats under /usr/share/man/zh_TW...
Checking for stray cats under /var/cache/man/zh_TW...
Processing manual pages under /usr/share/man/es...
Updating index cache for path `/usr/share/man/es/man5'. Wait...done.
Checking for stray cats under /usr/share/man/es...
Checking for stray cats under /var/cache/man/es...
Processing manual pages under /usr/share/man/sl...
Updating index cache for path `/usr/share/man/sl/man1'. Wait...done.
Checking for stray cats under /usr/share/man/sl...
Checking for stray cats under /var/cache/man/sl...
Processing manual pages under /usr/share/man/pt...
Updating index cache for path `/usr/share/man/pt/man5'. Wait...done.
Checking for stray cats under /usr/share/man/pt...
Checking for stray cats under /var/cache/man/pt...
Processing manual pages under /usr/share/man/pt_BR...
Updating index cache for path `/usr/share/man/pt_BR/man5'. Wait...done.
Checking for stray cats under /usr/share/man/pt_BR...
Checking for stray cats under /var/cache/man/pt_BR...
Processing manual pages under /usr/share/man/ru...
Updating index cache for path `/usr/share/man/ru/man5'. Wait...done.
Checking for stray cats under /usr/share/man/ru...
Checking for stray cats under /var/cache/man/ru...
Processing manual pages under /usr/share/man/pl...
Updating index cache for path `/usr/share/man/pl/man5'. Wait...done.
Checking for stray cats under /usr/share/man/pl...
Checking for stray cats under /var/cache/man/pl...
Processing manual pages under /usr/share/man/id...
Updating index cache for path `/usr/share/man/id/man5'. Wait...done.
Checking for stray cats under /usr/share/man/id...
Checking for stray cats under /var/cache/man/id...
Processing manual pages under /usr/share/man/tr...
Updating index cache for path `/usr/share/man/tr/man5'. Wait...done.
Checking for stray cats under /usr/share/man/tr...
Checking for stray cats under /var/cache/man/tr...
Processing manual pages under /usr/share/man/vi...
Updating index cache for path `/usr/share/man/vi/man1'. Wait...done.
Checking for stray cats under /usr/share/man/vi...
Checking for stray cats under /var/cache/man/vi...
Processing manual pages under /usr/local/man...
Updating index cache for path `/usr/local/man/man3'. Wait...mandb: warning: /usr/local/man/man3/Pegex::API.3pm: whatis parse for Pegex::API(3pm) failed
mandb: warning: /usr/local/man/man3/Pegex::Syntax.3pm: whatis parse for Pegex::Syntax(3pm) failed
mandb: warning: /usr/local/man/man3/Pegex::Tutorial.3pm: whatis parse for Pegex::Tutorial(3pm) failed
mandb: warning: /usr/local/man/man3/Pegex::Tutorial::Calculator.3pm: whatis parse for Pegex::Tutorial::Calculator(3pm) failed
mandb: warning: /usr/local/man/man3/Pegex::Resources.3pm: whatis parse for Pegex::Resources(3pm) failed
mandb: warning: /usr/local/man/man3/Pegex::Tutorial::JSON.3pm: whatis parse for Pegex::Tutorial::JSON(3pm) failed
mandb: warning: /usr/local/man/man3/Pegex::Miscellany.3pm: whatis parse for Pegex::Miscellany(3pm) failed
mandb: warning: /usr/local/man/man3/Pegex::Overview.3pm: whatis parse for Pegex::Overview(3pm) failed
done.
Checking for stray cats under /usr/local/man...
Checking for stray cats under /var/cache/man/oldlocal...
84 man subdirectories contained newer manual pages.
10992 manual pages were added.
0 stray cats were added.
real 2m2.645s
user 1m58.135s
sys 0m48.983s
0
重建手册页数据库后,行为没有变化:
# man man || echo fail
#
我下一步应采取什么步骤来修复或排除此问题?
谢谢你!
答案1
好吧,既然我问了,这里有一些我可以做的故障排除:
# man man | wc
502 4948 35082
因此是输出来自 man。问题是我的环境的 PAGER 变量未设置。
export PAGER=less
修复。