Can't install man pages on minimal Centos Docker container
Your image probably has the nodocs
transaction flag set in the yum configuration (cf. /etc/yum.conf
).
You can remove it globally (or at the yum command line) before (re-)installing the packages you want the man pages for.
For example:
yum --setopt=tsflags='' reinstall shadow-utils
Nothing here worked and on top of that the accepted answer contains a typo. I don't have enough Rep to comment there so I'm adding it here as an answer in case it helps anyone.
To install a package with man pages use:
yum --setopt=tsflags='' install man-db
Then:
yum --setopt=tsflags='' install {your-package-name}
Or, you can permanently remove the line from yum.conf which prevents man pages from installing. To do this, use:
sed -i '/tsflags=nodocs/d' /etc/yum.conf
Then you can use yum install
or yum reinstall
normally.
Source
I know this is an old question but given the time that I've spent tracking this, it will come in handy to someone else eventually.
The problem is related to the way RPM is configured in the docker image, first check to see if the excludedocs
directive is listed in the configuration of RPM like so:
# rpm --showrc | grep docs
If it is in there then you must find the file that specifies it in my case it was under /etc/rpm/macros.imgcreate
and remove it
Yum should then perform all man-page installation as expected (given that you don't also have the nodocs
tsflag
mentioned above.