1、C语言库函数基本的帮助文档

sudo apt-get install manpages 
  sudo apt-get install manpages-de 
  sudo apt-get install manpages-de-dev 
  sudo apt-get install manpages-dev

2、POSIX函数帮助文档

sudo apt-get install manpages-posix
  sudo apt-get install manpages-posix-dev

3、内核函数

sudo apt-get install linux-doc

sudo apt-get install libcorelinux-doc

4. C++
sudo apt-get install libstdc++6-4.5-doc   //通过补齐查找具体的文件
//sudo apt-get install libstdc++6-4.3-doc //C++ API

1.添加库函数手册
ubuntu默认是没有安装c语言的库函数man手册的,所以你在man perror 和sendto之类的函数时会显示没有相关文档的问题,这个问题让我郁闷了我好久。解决方法:
sudo apt-get install manpages-dev
2.让man显示中文
ubuntu源里面已经包含了中文的man包,所以不用从其他地方down了,直接
sudo apt-get install manpages-zh
但是这样man默认显示的还不是中文,还需要以下两步
a.把中文man包转换成utf8格式的
新建一个脚本文件
gedit t.sh
把下面内容添加进去
#!/bin/bashcd /usr/share/man/zh_CN/for k in *docd $kfor i in *.gzdo j=`echo ${i%.gz}` gunzip $i iconv -f gb18030 -t utf8 $j >tmp mv tmp $j gzip $jdonecd ..done

           #!/bin/bashcd /usr/share/man/zh_CN/for k in *docd $kfor i in *.gzdoj=`echo ${i%\.gz}`gunzip $iiconv -f gb18030 -t utf8 $j >tmpmv tmp $jgzip $jdonecd ..done#我用上面装完再试着乱码显示。卸载重装 只装上面整个一句话成功。

然后
sudo chmod a+rwx t.sh
sudo ./t.sh
b.修改man默认的语言
sudo gedit /etc/manpath.config 把里面的所有的 /usr/share/man 改成 /usr/share/man/zh_CN
保存后退出,然后你再试一下man ls
3.让没有中文帮助的显示英文
做完上面第二部还不够,这时你再man 一下一些c语言函数(不要用printf,socket之类比较有名的函数,这些已经有中文帮助了)的时候就会发现竟然没有帮助,而刚才明明在第一步已经安装了啊。这是因为你上面 把/usr/share/man 改成 /usr/share/man/zh_CN的操作使man只在中文帮助中搜索,如果没有就直接放弃,因此还需要以下操作,才能让man在没有中文帮助的时候自动显示英文的帮助,如果英文的也没有,哪就真的没有了。
sudo gedit /etc/manpath.config
然后搜索你刚才改过的地方,然后在其后面添加同样的一行,只是后面的目录还用原来的/usr/share/man(所有的),比如在修改后的
MANPATH_MAP /bin          /usr/share/man/zh_CN
再添加一行
MANPATH_MAP /bin          /usr/share/man

# manpath.config
#
# This file is used by the man-db package to configure the man and cat paths.
# It is also used to provide a manpath for those without one by examining
# their PATH environment variable. For details see the manpath(5) man page.
#
# Lines beginning with `#' are comments and are ignored. Any combination of
# tabs or spaces may be used as `whitespace' separators.
#
# There are three mappings allowed in this file:
# --------------------------------------------------------
# MANDATORY_MANPATH         manpath_element
# MANPATH_MAP       path_element    manpath_element
# MANDB_MAP     global_manpath  [relative_catpath]
#---------------------------------------------------------
# every automatically generated MANPATH includes these fields
#
#MANDATORY_MANPATH          /usr/src/pvm3/man
#
MANDATORY_MANPATH           /usr/man
MANDATORY_MANPATH           /usr/share/man/zh_CN
MANDATORY_MANPATH           /usr/local/share/man#MANDATORY_MANPATH          /usr/share/man
#---------------------------------------------------------
# set up PATH to MANPATH mapping
# ie. what man tree holds man pages for what binary directory.
#
#       *PATH*        -> *MANPATH*
#MANPATH_MAP    /bin            /usr/share/man/zh_CN
MANPATH_MAP /usr/bin        /usr/share/man/zh_CN
MANPATH_MAP /sbin           /usr/share/man/zh_CN
MANPATH_MAP /usr/sbin       /usr/share/man/zh_CN
MANPATH_MAP /usr/local/bin      /usr/local/man
MANPATH_MAP /usr/local/bin      /usr/local/share/man
MANPATH_MAP /usr/local/sbin     /usr/local/man
MANPATH_MAP /usr/local/sbin     /usr/local/share/man
MANPATH_MAP /usr/X11R6/bin      /usr/X11R6/man
MANPATH_MAP /usr/bin/X11        /usr/X11R6/man
MANPATH_MAP /usr/games      /usr/share/man/zh_CN
MANPATH_MAP /opt/bin        /opt/man
MANPATH_MAP /opt/sbin       /opt/man#MANPATH_MAP    /bin                 /usr/share/man  #让man在没有中文帮助的时候自动显示英文的帮助
#MANPATH_MAP    /usr/bin        /usr/share/man
#MANPATH_MAP    /sbin           /usr/share/man
#MANPATH_MAP    /usr/sbin       /usr/share/man
#MANPATH_MAP    /usr/games      /usr/share/man
#---------------------------------------------------------
# For a manpath element to be treated as a system manpath (as most of those
# above should normally be), it must be mentioned below. Each line may have
# an optional extra string indicating the catpath associated with the
# manpath. If no catpath string is used, the catpath will default to the
# given manpath.
#
# You *must* provide all system manpaths, including manpaths for alternate
# operating systems, locale specific manpaths, and combinations of both, if
# they exist, otherwise the permissions of the user running man/mandb will
# be used to manipulate the manual pages. Also, mandb will not initialise
# the database cache for any manpaths not mentioned below unless explicitly
# requested to do so.
#
# In a per-user configuration file, this directive only controls the
# location of catpaths and the creation of database caches; it has no effect
# on privileges.
#
# Any manpaths that are subdirectories of other manpaths must be mentioned
# *before* the containing manpath. E.g. /usr/man/preformat must be listed
# before /usr/man.
#
#       *MANPATH*     -> *CATPATH*
#
MANDB_MAP   /usr/man        /var/cache/man/fsstnd
MANDB_MAP   /usr/share/man/zh_CN        /var/cache/man
MANDB_MAP   /usr/local/man      /var/cache/man/oldlocal
MANDB_MAP   /usr/local/share/man    /var/cache/man/local
MANDB_MAP   /usr/X11R6/man      /var/cache/man/X11R6
MANDB_MAP   /opt/man        /var/cache/man/opt
#
#---------------------------------------------------------
# Program definitions.  These are commented out by default as the value
# of the definition is already the default.  To change: uncomment a
# definition and modify it.
#
#DEFINE     pager   pager -s
#DEFINE     cat cat
#DEFINE     tr  tr '\255\267\264\327' '\055\157\047\170'
#DEFINE     grep    grep
#DEFINE     troff   groff -mandoc
#DEFINE     nroff   nroff -mandoc
#DEFINE     eqn     eqn
#DEFINE     neqn    neqn
#DEFINE     tbl     tbl
#DEFINE     col     col
#DEFINE     vgrind  vgrind
#DEFINE     refer   refer
#DEFINE     grap    grap
#DEFINE     pic     pic -S
#
#DEFINE     compressor  gzip -c7
#---------------------------------------------------------
# Misc definitions: same as program definitions above.
#
#DEFINE     whatis_grep_flags       -i
#DEFINE     apropos_grep_flags      -iEw
#DEFINE     apropos_regex_grep_flags    -iE
#---------------------------------------------------------
# Section names. Manual sections will be searched in the order listed here;
# the default is 1, n, l, 8, 3, 0, 2, 5, 4, 9, 6, 7. Multiple SECTION
# directives may be given for clarity, and will be concatenated together in
# the expected way.
# If a particular extension is not in this list (say, 1mh), it will be
# displayed with the rest of the section it belongs to. The effect of this
# is that you only need to explicitly list extensions if you want to force a
# particular order. Sections with extensions should usually be adjacent to
# their main section (e.g. "1 1mh 8 ...").
#
SECTION     1 n l 8 3 2 3posix 3pm 3perl 5 4 9 6 7
#
#---------------------------------------------------------
# Range of terminal widths permitted when displaying cat pages. If the
# terminal falls outside this range, cat pages will not be created (if
# missing) or displayed.
#
#MINCATWIDTH    80
#MAXCATWIDTH    80
#
# If CATWIDTH is set to a non-zero number, cat pages will always be
# formatted for a terminal of the given width, regardless of the width of
# the terminal actually being used. This should generally be within the
# range set by MINCATWIDTH and MAXCATWIDTH.
#
#CATWIDTH   0
#
#---------------------------------------------------------
# Flags.
# NOCACHE keeps man from creating cat pages.
#NOCACHE

参考:http://blog.csdn.net/linking530/article/details/7284482
http://blog.csdn.net/chang198932/article/details/18728703
http://blog.163.com/fanning_7213/blog/static/2496505201102610539141/

ubuntu安装man中文帮助文档:man c/c++相关推荐

  1. VIM7.3添加中文帮助文档

    安装中文帮助文档之前首先执行下列操作: 在home目录下列新建文件夹  : .vim ------------------>.vim是一个隐藏文件,不要漏了 "." .vim ...

  2. [原创] Ubuntu 安装vim与中文帮助文档

    Henry是没事儿在Windows下面玩的Vim,搬到Ubuntu上面之后感觉Vi用着特别别扭(尤其是剪切板上面的东西无法paste在Vi中...)于是乎...打算把Vi改装成Vim,这样也许就会好多 ...

  3. Ubuntu 11.04解决txt文档中文乱码方法

    Ubuntu 11.04解决txt文档中文乱码方法: $ gconftool-2 --set --type=list --list-type=string /apps/gedit-2/preferen ...

  4. Scapy中文使用文档

    Scapy中文使用文档 from:http://www.secdev.org/projects/scapy/doc/usage.html by Larry 0x01 起航Scapy Scapy的交互s ...

  5. HighCharts/Highstock使用小结,使用汉化及中文帮助文档

       此文档是本人在开发过程图形报表时使用HighCharts所遇到的问题及解决方案 .最后附上有HighCharts中文帮助文档 HighCharts  版本:Highcharts-3.0.1 Hi ...

  6. GRUB4DOS中文自述文档;Grub4dos中文ReadMe

    GRUB4DOS中文自述文档 版本:0.4.4-2009-03-18 英文版作者:tinybit (tinybit@tom.com) 中文版译者:zw2312914(zw2312914@126.com ...

  7. 【中文技术文档的写作规范_P03】如何书写标点符号和控制文档体系

    通过本文,你将了解到中文技术文档中标点符号和文档体系的写法. 文章目录 标点符号 原则 句号 逗号 顿号 分号 引号 括号 冒号 省略号 感叹号 破折号 连接号 文档体系 结构 文件名 标点符号 原则 ...

  8. 中文技术文档写作规范【转载】

    标题 层级 标题分为四级. 一级标题:文章的标题 二级标题:文章主要部分的大标题 三级标题:二级标题下面一级的小标题 四级标题:三级标题下面某一方面的小标题 原则 一级标题下,不能直接出现三级标题. ...

  9. Sequelize 中文API文档

    Sequelize 中文API文档-1. 快速入门.Sequelize类 2016年05月20日     35766     声明 Sequelize类是引用sequlize模块后获取一个顶级对象,我 ...

最新文章

  1. ios(iphone/ipad)一个简单的用代码判断当前设备的方法
  2. p8工程师告诉你软件测试的三大误区,你误了几个?
  3. python多线程怎么写_怎么样优雅的使用python多线程?python进阶
  4. Spring过滤器组件自动扫描
  5. ubuntu中的日志文件位置,用于错误查找
  6. SQL-92标准 中文翻译——定义、记号和约定 (定义)
  7. java分支语句有哪些_Java代码多分支语句优化
  8. unity两个项目合并 同名_表格合并,你还在复制粘贴?教你一键合并,超简单!...
  9. Unity 和腾讯游戏成立联合创新实验室:从技术创新探索游戏产品新模式和概念
  10. java常用面板_Java 常用面板
  11. [解题报告]Bees' ancestors
  12. 两个向量的夹角公式_向量的夹角公式!急急急!!!
  13. 全产业链核心升级 集聚创新大展宏图——慕尼黑华南电子展回顾
  14. React H5 使用div自定义简单富文本编辑器
  15. AT32F437VM SPI驱动AT7456E OSD芯片
  16. 【经典算法6——冒泡排序】
  17. swiper轮播-可支持触摸滑动(整理)
  18. 半夜开piao竟然被罚
  19. 安卓苹果通用高兼容性蓝牙耳机,双11新款高人气蓝牙耳机推荐
  20. 1108. String复读机(20分)

热门文章

  1. 如何在腾讯地图上设置多种颜色的点位和自定义背景弹出框
  2. echarts树图修改连线样式颜色,树的形状曲线和折线,树图边的曲度
  3. R code execution error处理
  4. MySql自动增长从头开始
  5. POJ 3095 Linear Pachinko 笔记
  6. 视频素材从哪里找?看这篇就对了
  7. 特斯拉降价,国产车嘴上说不怕实际两股战战,后续还有可怕的技术
  8. FoneDog iOS Toolkit(苹果数据恢复软件)官方正式版V2.1.62 | 苹果数据恢复大师下载 | 苹果数据恢复有免费的吗?
  9. 北京内推 | 微软亚洲研究院机器学习组招聘研究型实习生
  10. Git Failed to connect to github.com port 443: Timed out