知识屋:更实用的电脑技术知识网站
所在位置:首页 > 操作系统 > linux

有关CentOS6的man报错

发布时间:2014-09-05 16:42:44作者:知识屋

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]$

 

摘自 一刀流的专栏

(免责声明:文章内容如涉及作品内容、版权和其它问题,请及时与我们联系,我们将在第一时间删除内容,文章内容仅供参考)
收藏
  • 人气文章
  • 最新文章
  • 下载排行榜
  • 热门排行榜