Makewhatis command isn't found on Rocky Linux install - reinstall of make-db didn't work

Currently using Rocky version 9 on my desktop system.
While studying/researching, I found that the makewhatis command isn’t found on either system.

STEPS TAKEN (all of which were performed under sudo):

  1. I removed the man-db package from both (used dnf), rebooted, and reinstalled the packages - to no avail.
  2. I then looked online to check if that package has been deprecated - but there doesn’t seem to be any documentation mentioning such.
  3. After the reinstalls, I performed a mandb -c command - to no avail.
  4. checked the install’s /usr/sbin - there was no file/directory for makewhatis in the install’s directory.

I don’t think it is likely that the installs were corrupted: I did check it install by confirming its .iso signature and .sig file’ signatures to confirm that there was nothing wrong with the file.

How should I create and update the man files, with that command removed?

NOTE: I brought this up in the Linux.org forum, as I was also experiencing this issue on my Debian 12 laptop. They were able to assist me by pointing me to the Debian packages page - however, I am not able to find the Rocky/Fedora/RHEL counterpart for that page, to try installing mandoc (if that is what is required to install onto Rocky).

The following searches do what you’re looking for:

https://pkgs.org/search/?q=%2Fusr%2Fsbin%2Fmakewhatis

https://pkgs.org/search/?q=mandoc

[root@xmpp01 ~]# dnf install epel-release -y
[root@xmpp01 ~]# dnf whatprovides \*/makewhatis
Last metadata expiration check: 1:03:30 ago on Thu 21 Dec 2023 05:15:25 PM MST.
mandoc-1.14.6-2.el9.x86_64 : A suite of tools for compiling mdoc and man
Repo        : epel
Matched from:
Filename    : /usr/sbin/makewhatis

Thanks for that info!

I need to ask: what does that command mean exactly (I’m trying to determine what does the “\*/” mean)?

I tried the command

$ dnf search epel-release
Last metadata expiration check: 19 days, 20:00:05 ago on Fri 01 Dec 2023 10:12:28 PM PST.
===================================================== Name Exactly Matched: epel-release ======================================================
epel-release.noarch : Extra Packages for Enterprise Linux repository configuration
epel-release.src : Extra Packages for Enterprise Linux repository configuration
$ dnf search mandoc
======================================================== Name Exactly Matched: mandoc =========================================================
mandoc.x86_64 : A suite of tools for compiling mdoc and man
======================================================= Name & Summary Matched: mandoc ========================================================
libmandoc-devel.x86_64 : Development libraries and headers for libmandoc
$ **dnf whatprovides \*/makewhatis**
mandoc-1.14.6-2.el9.x86_64 : A suite of tools for compiling mdoc and man
Repo        : @System
Matched from:
Filename    : /usr/sbin/makewhatis

mandoc-1.14.6-2.el9.x86_64 : A suite of tools for compiling mdoc and man
Repo        : epel
Matched from:
Filename    : /usr/sbin/makewhatis

$ sudo dnf install mandoc-1.14.6-2.el9.x86_64
[sudo] password for XXXXXX: 
Last metadata expiration check: 2:04:17 ago on Thu 21 Dec 2023 04:12:00 PM PST.
Package mandoc-1.14.6-2.el9.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
$ 

$ makewhatis
bash: makewhatis: command not found...
Install package 'mandoc' to provide command 'makewhatis'? [N/y] y


 * Waiting in queue... Failed to install packages: mandoc-1.14.6-2.el9.x86_64 is already installed

$

The reason why I mention this is that you mention that I would need to add the “dnf install epel-release -y” command.

I’m confused as your “whatprovides” command showed that the package is part of the epel repo - the problem is that I have that repo already:

$ dnf repolist | grep epel
epel                        Extra Packages for Enterprise Linux 9 - x86_64
epel-cisco-openh264         Extra Packages for Enterprise Linux 9 openh264 (From Cisco) - x86_64
$ 

Just tried adding:

$ sudo dnf install epel-release -y
[sudo] password for priestapostate: 
Last metadata expiration check: 2:56:18 ago on Thu 21 Dec 2023 04:12:00 PM PST.
Package epel-release-9-7.el9.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[priestapostate@scion1208 ~]$ 

The whatprovides I showed is a wildcard search among paths and directories.

mandoc provides what you’re looking for. but not in the way you probably think. /usr/sbin/makewhatis is a ghost file and doesn’t actually exist. instead you may need to call makewhatis.mandoc, which is handled by alternatives.

[root@xmpp01 ~]# dnf install mandoc -y
Last metadata expiration check: 3:37:40 ago on Thu 21 Dec 2023 05:15:25 PM MST.
Dependencies resolved.
================================================================================================================================================================
 Package                              Architecture                         Version                                     Repository                          Size
================================================================================================================================================================
Installing:
 mandoc                               x86_64                               1.14.6-2.el9                                epel                               353 k

Transaction Summary
================================================================================================================================================================
Install  1 Package

Total download size: 353 k
Installed size: 794 k
Downloading Packages:
mandoc-1.14.6-2.el9.x86_64.rpm                                                                                                  429 kB/s | 353 kB     00:00
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                           271 kB/s | 353 kB     00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                        1/1
  Installing       : mandoc-1.14.6-2.el9.x86_64                                                                                                             1/1
  Running scriptlet: mandoc-1.14.6-2.el9.x86_64                                                                                                             1/1
  Verifying        : mandoc-1.14.6-2.el9.x86_64                                                                                                             1/1

Installed:
  mandoc-1.14.6-2.el9.x86_64

Complete!

[root@xmpp01 ~]# ll /usr/sbin/makewhatis.mandoc
lrwxrwxrwx. 1 root root 13 Feb  9  2022 /usr/sbin/makewhatis.mandoc -> ../bin/mandoc

Okay - then that is where I’m running into the issue:

$ ll /usr/sbin/makewhatis.mandoc
lrwxrwxrwx. 1 root root 13 Feb  9  2022 /usr/sbin/makewhatis.mandoc -> ../bin/mandoc
$ makewhatis
bash: makewhatis: command not found...
Install package 'mandoc' to provide command 'makewhatis'? [N/y] y


 * Waiting in queue... Failed to install packages: mandoc-1.14.6-2.el9.x86_64 is already installed

$ 

Tried with sudo - mandoc is shown - but the command isn’t there:

$ sudo ls -alF /usr/sbin/makewhatis.mandoc
lrwxrwxrwx. 1 root root 13 Feb  9  2022 /usr/sbin/makewhatis.mandoc -> ../bin/mandoc*
$ sudo makewhatis
sudo: makewhatis: command not found

Even though I removed the mandoc, rebooted, and reinstalled it, I’m running into this issue with makewhatis not working.

With that result, I then tried referencing that command path directly:

sudo /usr/sbin/makewhatis.mandoc

Which seemed to cause the shell to freeze for over 10 minutes. Giving it a few minutes more to try out. While I’m doing so, I’m checking out the links you provided in the last response.

Thanks for providing the link to pkgs.org, by the way - I’m trying to learn how that site works as well. I take it that it isn’t a repository per se for me to add to my repo list?

What does the makewhatis command do?

Online man makewhatis https://linux.die.net/man/8/makewhatis writes:

makewhatis reads all the manual pages contained in the given sections of manpath or the preformatted pages contained in the given sections of catpath. For each page, it writes a line in the whatis database; each line consists of the name of the page and a short description, separated by a dash.

In other words, it rewrites files, like /usr/man/whatis

man whatis (on el9) writes:

index databases are used during the search, and are updated by the mandb program. Depending on your installation, this may be run by a periodic cron job, or may need to be run manually after new manual pages have been installed. To produce an old style text whatis database from the relative index database, issue the command:

  whatis -M manpath -w '*' | sort > manpath/whatis

where manpath is a manual page hierarchy such as /usr/man.


If update of “whatis database” for whatis is the only task of makewhatis and there is already alternative (and presumably more efficient) “index” database format and tool (mandb) for making it, then there is no good reason to have old makewhatis any more.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.