0

The Problem

I've installed Ubuntu 22.04 with minimized installation, then I "unmimized" it by executing sudo unminimize. However, the man package was not originally present and thus mandb-triggers for the originally installed packages were triggered.

That results in the following:

$ man ls
No manual entry for ls
$ man bash
No manual entry for bash

For some packages, that was worked-around by reinstalling them:

$ man curl
No manual entry for curl
$ sudo apt-get reinstall curl
<...>
$ man curl
# Works!

However, this is not the case for some utilities:

$ dpkg -S "$(which env)"
coreutils: /usr/bin/env
# Could be reinstalled with apt

$ dpkg -S "$(which bash)" dpkg-query: no path found matching pattern /usr/bin/bash

Could not

Thus, I'm asking:

  1. Is there any option to add manpages for the system packages (such as ls, bash, etc.)
  2. If not, is there any option to force dpkg to process triggers for already installed package? I've seen an option to do so for .deb files, but not for the already-installed ones.

Upd.1: "Non-package" programs and Unoptimal solution

/bin and /usr/bin

Also, ls and some other was provided by the package coreutils, but there were present in both /bin/ and /usr/bin/ directories:

$ which ls
/usr/bin/ls
$ ll /usr/bin/ls
-rwxr-xr-x 1 root root 138208 Feb  7 16:03 /usr/bin/ls*
$ ll /bin/ls
-rwxr-xr-x 1 root root 138208 Feb  7 16:03 /bin/ls*
$ dpkg -L coreutils | grep /ls
/bin/ls
/usr/share/man/man1/ls.1.gz

The same was the case for the bash package installing bash to /bin/bash but PATH finding it at /usr/bin/bash

Unoptimal solution

Well, I've managed to solve that issue by reinstalling every single package on the machine:

# WARNING: This will reinstall ALL EXISTING packages
$ apt list --installed 2>/dev/null | tail -n +2 | sed -E 's|^(.+)/.*$|\1|gm' | xargs sudo apt-get reinstall -y

That resulted in ~1h downloads and installations, kernel upgrade, and reboot, but the problem was eventually solved.

1 Answers1

0

If I'm not mistaken, software packages include man pages, so it might be that the man pages are there, but just not cataloged in the man index database yet. If that's the case, a simple sudo mandb should find all the missing manual pages, and the problem should be solved. If for some reason this doesn't work, try sudo mandb -c, which will force mandb to rebuild the entire index database from scratch.

ArrayBolt3
  • 3,129
  • 1
    I would like to test this, but, however, I have managed to find the extremely non-optimal solution (see above) by reinstalling the entire package list. – Peter Zaitcev May 25 '22 at 11:14