4

I am using WSL on win10 with lxrunoffline distribution managing utility. My distro is Ubuntu 18.04 core install that can be found here - download link.

Typing man man, man pwd or man <anything> produces the following result:

No manual entry for man
See 'man 7 undocumented' for help when manual pages are not available.

Here's some commands I tried:

$ sudo mandb
Purging old database entries in /usr/share/man...
Processing manual pages under /usr/share/man...
Purging old database entries in /usr/share/man/cs...
Processing manual pages under /usr/share/man/cs...
Purging old database entries in /usr/share/man/da...
Processing manual pages under /usr/share/man/da...
...
0 man subdirectories contained newer manual pages.
0 manual pages were added.
0 stray cats were added.
0 old database entries were purged.


$ sudo mandb -t   */ output here certainly looks suspicious /*
mandb: warning: /usr/share/man/man1/sh.1.gz is a dangling symlink
mandb: warning: can't update index cache /var/cache/man/index.db: Resource temporarily unavailable
mandb: warning: can't update index cache /var/cache/man/cs/index.db: Resource temporarily unavailable
mandb: warning: can't update index cache /var/cache/man/da/index.db: Resource temporarily unavailable
mandb: warning: can't update index cache /var/cache/man/de/index.db: Resource temporarily unavailable
...


$ dpkg -l | grep -i manpages
ii  manpages                    4.15-1                            all          Manual pages about using a GNU/Linux system
ii  manpages-dev                4.15-1                            all          Manual pages about using GNU/Linux for development
ii  manpages-posix              2013a-2                           all          Manual pages about using POSIX system

Also I checked /usr/share/man folders and they were mostly empty (other manpath folders were completely empty), except some broken symbolic link:

$ manpath
/usr/local/man:/usr/local/share/man:/usr/share/man
$ cd /usr/share/man/man1
$ ls -alh
drwxr-xr-x 1 root root 4.0K Nov 27 18:16 .
drwxr-xr-x 1 root root 4.0K Sep 28 04:02 ..
lrwxrwxrwx 1 root root    9 Sep 28 04:00 sh.1.gz -> dash.1.gz
$ file sh.1.gz
sh.1.gz: broken symbolic link to dash.1.gz

Then I tried putting man gzips I found on Ubuntu manpages website into man1 folder and that makes it to work properly:

$ cd /usr/share/man/man1
$ ls -alh
drwxr-xr-x 1 root root 4.0K Nov 27 18:16 .
drwxr-xr-x 1 root root 4.0K Sep 28 04:02 ..
-rwxr-xr-x 1 root root 3.1K Nov 27 18:16 ls.1.gz <-- downloaded this one
lrwxrwxrwx 1 root root    9 Sep 28 04:00 sh.1.gz -> dash.1.gz
*/ 'man ls' works now /*

Also tried reinstalling mandb and manpages to no avail.

Downloading man page files manually solves the issue but there's gotta be some package or config that does that for me. How can I solve this?

Edit 1

$ head -n 1000 /etc/dpkg/dpkg.cfg /etc/dpkg/dpkg.cfg.d/*
==> /etc/dpkg/dpkg.cfg <==
# dpkg configuration file
#
# This file can contain default options for dpkg.  All command-line
# options are allowed.  Values can be specified by putting them after
# the option, separated by whitespace and/or an `=' sign.
#

# Do not enable debsig-verify by default; since the distribution is not using
# embedded signatures, debsig-verify would reject all packages.
no-debsig

# Log status changes and actions to a file.
log /var/log/dpkg.log

==> /etc/dpkg/dpkg.cfg.d/excludes <==
# Drop all man pages
path-exclude=/usr/share/man/*

# Drop all documentation ...
path-exclude=/usr/share/doc/*

# ... except copyright files ...
path-include=/usr/share/doc/*/copyright

# ... and Debian changelogs
path-include=/usr/share/doc/*/changelog.Debian.*
7

The first two lines of /etc/dpkg/dpkg.cfg.d/excludes

# Drop all man pages
path-exclude=/usr/share/man/*

cause all man pages to be dropped when packages are installed.

To make man pages available, you’ll have to comment the second line out:

# Drop all man pages
# path-exclude=/usr/share/man/*

then re-install any package for which you want the man pages:

apt --reinstall install man-db coreutils

to restore the man and ls man pages (among others).

|improve this answer|||||
  • It worked, thank you! Just one more thing I was wondering - ubuntu core didn't have (for example) curl command which I had to install. Man page on curl shows the same See 'man 7 undocumented' error. Reinstalling curl solved the issue. Should I reinstall all the utilities that were not included in core distro in order for man pages work for those or is there some better way? – vikdotdev Nov 28 '18 at 17:03
  • I don’t think there’s a better way than re-installing the packages... – Stephen Kitt Nov 28 '18 at 17:14
  • The real question then is why the exclude is active. It is not the default, I think – Rui F Ribeiro Nov 28 '18 at 18:02
  • @Rui it’s certainly not the default, but it’s quite common as a customisation in small images; see here for an example similar to this one. – Stephen Kitt Nov 28 '18 at 20:41
  • @StephenKitt I should know, I also made it myself in some templates of mine... ;) notably tiny VMs running DNS/DHCP servers. – Rui F Ribeiro Nov 28 '18 at 21:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.