How to fix the “No manual entry for {command}” man error

Sometimes you will encounter an error like this when trying to use man:


You can find all my latest posts on medium.
$ man vmstat
No manual entry for vmstat

To fix this, first check that you have the following rpms installed:

$ yum install -y man-pages
$ yum install -y man-db

Next run the mandb command to populate/update the mandb database:

$ mandb

Then run the following command, to try to find the man .gz man file.

$ yum whatprovides */vmstat.*.gz

In your case you replace ‘vmstat’ with whatever command that you’re having problems with.

Now if that packages isn’t installed, then install it. in my case it was already installed, but the file itself was missing for some reason:

$ file /usr/share/man/man8/vmstat.8.gz
/usr/share/man/man8/vmstat.8.gz: cannot open (No such file or directory)

In this situation, just reinstall the rpm again:

$ yum reinstall procps