debuerreotype: Missing man directories in "slim" variants causes some packages to fail to install
For example, postgresql-client-9.4
installs an alternative for psql.1
resulting in this failure to install (apt-get install postgresql-client
in a debian:jessie-slim
container):
Setting up postgresql-client-9.4 (9.4.12-0+deb8u1) ...
update-alternatives: using /usr/share/postgresql/9.4/man/man1/psql.1.gz to provide /usr/share/man/man1/psql.1.gz (psql.1.gz) in auto mode
update-alternatives: error: error creating symbolic link `/usr/share/man/man1/psql.1.gz.dpkg-tmp': No such file or directory
dpkg: error processing package postgresql-client-9.4 (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of postgresql-client:
postgresql-client depends on postgresql-client-9.4; however:
Package postgresql-client-9.4 is not configured yet.
dpkg: error processing package postgresql-client (--configure):
dependency problems - leaving unconfigured
Leaving the empty directories behind should be enough to fix this, I think.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 26
- Comments: 21
Commits related to this issue
- openjdk cannot install on slim variant of Debian See https://github.com/debuerreotype/debuerreotype/issues/10 — committed to simgrid/simgrid by mquinson 6 years ago
- Upgrade to nginx 1.15 Also removed Consonance, which is not being used. Needed to explicitly create man1 and man7 directories, or Postgres installation would fail. See https://github.com/debuerreoty... — committed to DataBiosphere/azul by coverbeck 6 years ago
- Upgrade to nginx 1.15 Also removed Consonance, which is not being used. Needed to explicitly create man1 and man7 directories, or Postgres installation would fail. See https://github.com/debuerreoty... — committed to DataBiosphere/azul by coverbeck 6 years ago
- Fix for https://github.com/debuerreotype/debuerreotype/issues/10 — committed to CloudSurgeon/ansible-role-guacamole by deleted user 5 years ago
- change to use copy from local submodule instead of git clone at run-time. added fix for bug in slim image (https://github.com/debuerreotype/debuerreotype/issues/10). remove unused user creation. add ... — committed to fujisanmagazine/docker-ec-cube3 by akamiya 5 years ago
- guests: workaround problem installing JDK on Debian -slim containers JDK fails to install in -slim images due to a postin script failing to run update-alternatives. This is because the -slim containe... — committed to libvirt/libvirt-ci by berrange 4 years ago
- fix core images for openjdk compatibility. See https://github.com/debuerreotype/debuerreotype/issues/10 — committed to OpenCDI/cdi-docker-debian by deleted user 3 years ago
- formatters: Drop the JDK man dir workaround https://github.com/debuerreotype/debuerreotype/issues/10 got closed merging a workaround, so we can now drop ours. Signed-off-by: Erik Skultety <eskultet@... — committed to libvirt/libvirt-ci by eskultety 3 years ago
Or
or
, if
{1..8}
is not supportedFor anyone else running into this, since the issue is just that the /usr/share/man{1-8} directories are missing, you can just create them and everything should work, as documented in many of the linked issues:
Typo: The variable should be
$i
, not$1
.FYI, this fix is included in https://github.com/docker-library/official-images/pull/10730. 😄
Happy Debian Day! 🎉
🤦♂️ Yes, sorry.
Well… You can’t remove random bits from a package and still call it installed, can you?
Back in 2001, there was an effort to move all doc from “/usr/doc” to “/usr/share/doc”. The -devel list have some debate on this. That migration took a policy change and two release to finish, because they decided all files in required packages are required.
For small distro like this, it is unavoidable to remove some files. When packages break because of this, either push for a policy change or just put the empty directory back .
To add a little extra information from some re-testing today, this command errors out in both jessie and stretch, but not in unstable, so the bit of code in
update-alternatives
which currently causes the failure in stable and oldstable is fixed in unstable. 🎉I’ve merged a workaround for this in https://github.com/debuerreotype/debuerreotype/pull/116 which I don’t love, but will live with. Barring any major issues, it’ll be part of the next rebuild of the images.
Edit: to be clear: I’m still of the opinion that this is a bug in
update-alternatives
, but I think the chances of actually fixing it there are low (hence the workaround indebuerreotype-slimify
instead).Is there any agreement on the right long term fix for this issue ? I’ve just hit it with openjdk-11-jre-headless in both debian:10-slim and debian:sid-slim containers and its frustrating for users of the containers to have to add special case workarounds prior to installing certain packages.
Should the /usr/share/man/man* directory layout be preserved as empty dirs in the -slim images, or do the individual affected packages need to be identified and fixed to explicitly cope with missing man page directories ?
I could reproduce it with:
@tianon The installation of
openjdk-11-jre-headless
(one of the affected packages) still fails ondebian:unstable-slim
:Is there something else that needs to be done to get the fixed version?
This has been discussed a bit, and left as a bit of an intentional wart so that you (as the user of the image) get to be aware that a package you’re trying to install might be leaving files in a directory which is supposed to be purged.
It comes up often enough that I’m starting to waver on that point, though. Perhaps the majority of packages are well-behaved?
This behavior of
update-alternatives
exploding is amusing however, because once the target directory exists,update-alternatives
will no-op immediately since it recognizes that the source file doesn’t exist.