J'utilise WSL sur win10 avec l'utilitaire de gestion de distribution lxrunoffline. Ma distribution est l'installation principale d'Ubuntu 18.04 qui peut être trouvée ici - lien de téléchargement.
Taper man man
, man pwd
ou man <anything>
produit le résultat suivant :
No manual entry for man
See 'man 7 undocumented' for help when manual pages are not available.
Voici quelques commandes que j'ai essayées :
$ 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
J'ai aussi vérifié /usr/share/man
dossiers et ils étaient pour la plupart vides (les autres dossiers manpath étaient complètement vides), à l'exception d'un lien symbolique brisé :
$ 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
Ensuite, j'ai essayé de mettre man gzips que j'ai trouvé sur le site Web des pages de manuel d'Ubuntu dans le dossier man1 et cela fonctionne correctement :
$ 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 /*
J'ai également essayé de réinstaller mandb et les pages de manuel en vain.
Le téléchargement manuel des fichiers de page de manuel résout le problème, mais il doit y avoir un paquet ou une configuration qui le fait pour moi. Comment puis-je résoudre ce problème ?
Modifier 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.*
Réponse acceptée :
Les deux premières lignes de /etc/dpkg/dpkg.cfg.d/excludes
# Drop all man pages
path-exclude=/usr/share/man/*
entraîne la suppression de toutes les pages de manuel lors de l'installation des packages.
Connexe :Ubuntu – Parted :comment résoudre l'erreur de localisation en dehors de l'appareil ?Pour rendre les pages de manuel disponibles, vous devrez commenter la deuxième ligne :
# Drop all man pages
# path-exclude=/usr/share/man/*
puis réinstallez tout paquet dont vous voulez les pages de manuel :
apt --reinstall install man-db coreutils
pour restaurer le man
et ls
pages de manuel (entre autres).