安装man文档

        今天想查getopt函数的定义的时候,使用man 3 getopt的得到的是perl中的定义,而我想要linux中的getopt函数的定义,所以应该是man文档没有安装完整吧。没关系,把man安装一下就可以了。

# yum list man*
Loaded plugins: fastestmirror, langpacks, presto, refresh-packagekit
Loading mirror speeds from cached hostfile
 * fedora: ftp.sjtu.edu.cn
 * rpmfusion-free: ftp.sjtu.edu.cn
 * rpmfusion-free-updates: ftp.sjtu.edu.cn
 * rpmfusion-nonfree: ftp.sjtu.edu.cn
 * rpmfusion-nonfree-updates: ftp.sjtu.edu.cn
 * updates: mirrors.163.com
Installed Packages
man-db.i686                  2.6.0.2-6.fc17         @koji-override-0/$releasever                
Available Packages
man-db.i686                  2.6.0.2-9.fc17         updates                     
man-pages-cs.noarch          0.18.20090209-13.fc17  updates                     
man-pages-de.noarch          0.5-6.fc17             fedora                      
man-pages-es.noarch          1.55-17.fc17           fedora                      
man-pages-es-extra.noarch    1.55-17.fc17           fedora                      
man-pages-fr.noarch          3.23-6.fc17            fedora                      
man-pages-it.noarch          2.80-11.fc17           updates                     
man-pages-ja.noarch          20120415-1.fc17        updates                     
man-pages-ko.noarch          2:20050219-20.fc17     fedora                      
man-pages-pl.noarch          0.24-14.fc17           updates                     
man-pages-ru.noarch          0.98-6.fc17            fedora                      
man-pages-zh-CN.noarch       1.5.2-1.fc17           updates                     
man2html.i686                1.6-8.g.fc17           updates                     
man2html-core.i686           1.6-8.g.fc17           updates                     
mana.i686                    0.6.1-5.fc17           updates                     
manaworld.i686               0.5.2-7.fc17           fedora                      
manaworld-music.noarch       0.3-2.fc17             fedora                      
manchu-fonts.noarch          2.006-4.fc17           fedora                      
manedit.i686                 1.2.1-5.1.fc17         fedora                      
maniadrive.i686              1.2-45.fc17.2          updates                     
maniadrive-data.noarch       1.2-7.fc17             fedora                      
maniadrive-music.noarch      1.0-6.fc17             fedora                      
maniadrive-track-editor.i686 1.2-45.fc17.2          updates                     
mantis.noarch                1.2.8-2.fc17           fedora                      

mantis-config-httpd.noarch   1.2.8-2.fc17           fedora          

          这么多包该选哪一个呢?我们可以看看每个包的描述。(使用yum 的 info 选项)
[root@huntinux huntinux]# yum info man-pages.noarch
Loaded plugins: fastestmirror, langpacks, presto, refresh-packagekit
Loading mirror speeds from cached hostfile
 * fedora: ftp.sjtu.edu.cn
 * rpmfusion-free: ftp.sjtu.edu.cn
 * rpmfusion-free-updates: ftp.sjtu.edu.cn
 * rpmfusion-nonfree: ftp.sjtu.edu.cn
 * rpmfusion-nonfree-updates: ftp.sjtu.edu.cn
 * updates: mirrors.163.com
Available Packages
Name        : man-pages
Arch        : noarch
Version     : 3.35
Release     : 4.fc17
Size        : 4.4 M
Repo        : installed
From repo   : updates
Summary     : Man (manual) pages from the Linux Documentation Project
URL         : http://man7.org/linux/man-pages/
License     : GPLv2+ and GPL+ and BSD and MIT and Copyright only and IEEE
Description : A large collection of man pages (documentation) from the Linux
            : Documentation Project (LDP).
(这个包的描述说明其中含有很多man文档。)

把上面那个包安上就可以了。

[root@huntinux huntinux]# yum install man-pages.noarch

再次执行man 3 getopt就可以了。

(上面还有man的中文包:man-pages-zh-CN.noarch)

你可能感兴趣的:(安装man文档)