[实践Ok]有关CentOS6.3的man报错

jackxiang 2012-10-31 17:52 | |
^Croot@192.168.98.128:/# rpm -qa|grep man
man-1.6f-30.el6.i686
libsemanage-2.0.43-4.1.el6.i686

1)对于找不到的命令,man会报错:
[jing@CentOS locale]$ man abc
Cannot open the message catalog "man" for locale "zh_CN.UTF-8"
(NLSPATH="/usr/share/locale/%l/LC_MESSAGES/%N")
No manual entry for abc
[jing@CentOS locale]$
2)用strace看了一下,发现在最后:
...
open("/usr/share/locale/zh/LC_MESSAGES/man", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/zh_CN.UTF-8/man", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/zh_CN.UTF-8/LC_MESSAGES/man", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/zh/man", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/zh/LC_MESSAGES/man", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/zh/LC_MESSAGES/man", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/zh_CN.UTF-8/man", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/zh_CN.UTF-8/LC_MESSAGES/man", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/zh/man", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/zh/LC_MESSAGES/man", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/zh/LC_MESSAGES/man", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/zh_CN.UTF-8/man", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "Cannot open the message catalog "..., 112Cannot open the message catalog "man" for locale
"zh_CN.UTF-8"
(NLSPATH="/usr/share/locale/%l/LC_MESSAGES/%N")
) = 112
write(2, "No manual entry for abc\n", 24No manual entry for abc
) = 24
exit_group(1)                           = ?
3)将en下的man复制过来,先凑合用用:
cp /usr/share/locale/en/LC_MESSAGES/man /usr/share/locale/zh/LC_MESSAGES/
4)不报错了:
[jing@CentOS locale]$ man abc
No manual entry for abc
[jing@CentOS locale]$
摘自 一刀流的专栏

作者:jackxiang@向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除
地址:https://jackxiang.com/post/5711/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!


最后编辑: jackxiang 编辑于2012-10-31 17:52
评论列表
发表评论

昵称

网址

电邮

打开HTML 打开UBB 打开表情 隐藏 记住我 [登入] [注册]