可能是桌面登录时更改了语言相关的设置,导致man命令一直只显示END字符,重装也无效,折腾了良久!
man --help有如下输出
man, version 1.5o1
usage: man [-adfhktwW] [section] [-M path] [-P pager] [-S list]
[-m system] [-p string] name ...
a : find all matching entries
c : do not use cat file
d : print gobs of debugging information
D : as for -d, but also display the pages
f : same as whatis(1)
h : print this help message
k : same as apropos(1)
K : search for a string in all pages
t : use troff to format pages for printing
w : print location of man page(s) that would be displayed
(if no name given: print directories that would be searched)
W : as for -w, but display filenames only
C file : use `file' as configuration file
M path : set search path for manual pages to `path'
P pager : use program `pager' to display pages
S list : colon separated section list
m system : search for alternate system's man pages
p string : string tells which preprocessors to run
e - [n]eqn(1) p - pic(1) t - tbl(1)
g - grap(1) r - refer(1) v - vgrind(1)
尝试man -d error后得到最后一行的输出提示为:
not executing command:
(cd /usr/local/man && (echo ".ll 11.1i"; echo ".pl 1100i"; /bin/cat '/usr/local/man/man3/error.3'; echo ".\\\""; echo ".pl \n(nlu+10") | /usr/bin/gtbl | nroff --legacy ISO-8859-1 -man -rLL=121n -rLT=121n 2>/dev/null | /usr/bin/less -iRs)
然后从依次去掉最后的管道开始测试,发现
无输出:cd /usr/local/man && (echo ".ll 11.1i"; echo ".pl 1100i"; /bin/cat '/usr/local/man/man3/error.3'; echo ".\\\""; echo ".pl \n(nlu+10") | /usr/bin/gtbl | nroff --legacy ISO-8859-1 -man -rLL=121n -rLT=121n 2>/dev/null
有输出:cd /usr/local/man && (echo ".ll 11.1i"; echo ".pl 1100i"; /bin/cat '/usr/local/man/man3/error.3'; echo ".\\\""; echo ".pl \n(nlu+10") | /usr/bin/gtbl
再对比正常机器的设置,发现改为cd /usr/local/man && (echo ".ll 11.1i"; echo ".pl 1100i"; /bin/cat '/usr/local/man/man3/error.3'; echo ".\\\""; echo ".pl \n(nlu+10") | /usr/bin/gtbl | nroff -man 2>/dev/null后就正常了。
所以是nroff命令参数不对导致,更改/etc/man.config nroff相关的配置即可
#NROFF nroff --legacy NROFF_OLD_CHARSET -man #Can not work
NROFF nroff -man #Can Work
阅读(870) | 评论(0) | 转发(0) |