man 不显示手册页;如果“mandb -c”无法解决问题,该怎么办?

man 不显示手册页;如果“mandb -c”无法解决问题,该怎么办?

我有一个 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

修复。

相关内容