I have a minimal Centos 7 Docker image, and I'm trying to get some man pages on it to help in debugging my Dockerfile. Out of the box, it doesn't have much:
# man ls No manual entry for ls
Per this Serverfault answer, I installed the
man-pages RPM, and that seemed to go fine:
# yum install -y man-pages Loaded plugins: fastestmirror, ovl Loading mirror speeds from cached hostfile * base: mirror.vtti.vt.edu * extras: centos.mbni.med.umich.edu * updates: centos.netnitco.net Resolving Dependencies --> Running transaction check ---> Package man-pages.noarch 0:3.53-5.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ====================================================================================================== Package Arch Version Repository Size ====================================================================================================== Installing: man-pages noarch 3.53-5.el7 base 5.0 M Transaction Summary ====================================================================================================== Install 1 Package Total download size: 5.0 M Installed size: 4.6 M Downloading packages: man-pages-3.53-5.el7.noarch.rpm | 5.0 MB 00:00:01 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : man-pages-3.53-5.el7.noarch 1/1 Verifying : man-pages-3.53-5.el7.noarch 1/1 Installed: man-pages.noarch 0:3.53-5.el7 Complete!
# man ls No manual entry for ls
rpm to check that
man-pages was supposed to include the
ls man page, and it looks like it does:
# rpm -ql man-pages | grep -w ls /usr/share/man/man1p/ls.1p.gz
But it doesn't look like it was actually installed:
# man 1p ls No manual entry for ls in section 1p # ls -l /usr/share/man/man1p/ total 0
And it doesn't seem to be anywhere else on the filesystem, either.
# find / -name ls.1\* #
I can create files in
/usr/share/man/man1p/, so it's probably not some Docker virtual filesystem weirdness.
The best part of this is that what I really wanted right this minute was the man page for the
useradd command, which isn't even in that RPM. It's in
# yum whatprovides /usr/share/man/man8/useradd.8.gz Loaded plugins: fastestmirror, ovl Loading mirror speeds from cached hostfile * base: mirror.vtti.vt.edu * extras: mirror.tzulo.com * updates: centos.netnitco.net 2:shadow-utils-22.214.171.124-18.el7.x86_64 : Utilities for managing accounts and shadow password files Repo : base Matched from: Filename : /usr/share/man/man8/useradd.8.gz
Which is already installed.
# yum install shadow-utils Loaded plugins: fastestmirror, ovl Loading mirror speeds from cached hostfile * base: mirror.vtti.vt.edu * extras: centos.mbni.med.umich.edu * updates: centos.netnitco.net Package 2:shadow-utils-126.96.36.199-18.el7.x86_64 already installed and latest version Nothing to do
And, in fact, the binaries (e.g.
/usr/sbin/useradd) are there. But not the man pages.
# ls -l /usr/share/man/man8/useradd.8.gz ls: cannot access /usr/share/man/man8/useradd.8.gz: No such file or directory
So my questions are:
- Why can't I find any of the man pages that are supposed to be in the
shadow-utilsRPM, when I can find the binaries?
- Why doesn't (successfully) installing the
man-pagesRPM install the files that are supposed to be in that RPM?
Update: Per Aaron Marasco's answer and msuchy's comment, I tried
yum reinstall shadow-utils. As with
yum install man-pages, this appears to complete successfully, but doesn't actually put any files in