How to add entry in Linux man page database

我们两清 提交于 2019-12-17 18:37:41

问题


I have a manual page for mongoose web server named as mongoose.1 as a result of doing make and make install command to install mongoose web server on my ubuntu 12.04. But ,the man page entry is not in manual page database.

output on my command line when I did : "man mongoose"

akshay@akshay-Inspiron-N5010:~/mongoose$ man mongoose
  No manual entry for mongoose
  See 'man 7 undocumented' for help when manual pages are not available.

I know the path of all man pages where they are stored is:-

/usr/local/share/man/

I am thankful for your answers in advance.


回答1:


The directory where the manpage is installed should be listed either in /etc/manpath.config or in the MANPATH environment variable. E.g., if the manpage is

/opt/mongoose/share/man/man1/mongoose.1

then you can set it using

MANPATH=/opt/mongoose/share/man man mongoose

(or change the MANPATH in your .bashrc or similar shell startup file).




回答2:


Found a solution : We have to just copy mongoose.1 which is a man file into folder /use/share/man/man1/

akshay@akshay-Inspiron-N5010:~/mongoose$ sudo cp mongoose.1 /usr/share/man/man1/

in /usr/share/man/ there are folders named from man1 to man8 . I just guessed my man page extension of mongoose.1 is '1' so I copied that into man1 folder. Am I right on this ?

after this step , man mongoose shows the manual page entry successfully.



来源:https://stackoverflow.com/questions/14030904/how-to-add-entry-in-linux-man-page-database

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!