How can I find what package provides a missing man page on CentOS?

For the system using RPM (yum) package manager, for instance (here) CentOS, use yum provides or yum whatprovides:

provides or whatprovides
              Is used to find out which package provides some feature or
              file. Just use a specific name or a file-glob-syntax wildcards
              to list the packages available or installed that provide that
              feature or file.

For pcresyntax, you can try:

yum whatprovides "*/pcresyntax"

From RHL documentation,

yum provides "*/file_name" is a useful way to find the packages that contain file_name.

Also visit How do I find which rpm package supplies a file I'm looking for?


For Debian/Ubuntu based system which use APT as default package-manager, there is apt-file (thanks @Gilles for pointing out) command which can do a job what you're looking for.

DESCRIPTION
       apt-file is a command line tool for searching files in packages for the APT package management system.

search Search in which package a file is included. A list of all packages containing the  pattern  pattern  is returned.

So, use apt-file search to find a package that includes a file you're looking for.


In another words, manpage is provided by files (usually from /usr/share/man) and possible duplicate of How to find out which (not installed) package a file belongs to?!


I found it like:

yum whatprovides '*/man3/pcresyntax*'

which on my CentOS 6.5 machine says it's in pcre-devel-7.8-6.el6

Tags:

Centos

Man