Docker 失败,子进程 /usr/bin/dpkg 返回错误代码 (1)
我在尝试将JRE安装到我的docker容器中时遇到问题。
我不断收到错误消息;
Processing triggers for libc-bin (2.28-10) ...
Processing triggers for systemd (241-7~deb10u1) ...
Processing triggers for ca-certificates (20190110) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
done.
Processing triggers for libgdk-pixbuf2.0-0:amd64 (2.38.1+dfsg-1) ...
Errors were encountered while processing:
openjdk-11-jre-headless:amd64
openjdk-11-jre:amd64
default-jre
E: Sub-process /usr/bin/dpkg returned an error code (1)
如果我向上滚动一点构建输出,我也会看到以下问题;
Setting up default-jre-headless (2:1.11-71) ...
Setting up openjdk-11-jre-headless:amd64 (11.0.4+11-1~deb10u1) ...
update-alternatives: using /usr/lib/jvm/java-11-openjdk-amd64/bin/rmid to provide /usr/bin/rmid (rmid) in auto mode
update-alternatives: error: error creating symbolic link '/usr/share/man/man1/rmid.1.gz.dpkg-tmp': No such file or directory
dpkg: error processing package openjdk-11-jre-headless:amd64 (--configure):
installed openjdk-11-jre-headless:amd64 package post-installation script subprocess returned error exit status 2
dpkg: dependency problems prevent configuration of openjdk-11-jre:amd64:
openjdk-11-jre:amd64 depends on openjdk-11-jre-headless (= 11.0.4+11-1~deb10u1); however:
Package openjdk-11-jre-headless:amd64 is not configured yet.
dpkg: error processing package openjdk-11-jre:amd64 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of default-jre:
default-jre depends on openjdk-11-jre; however:
Package openjdk-11-jre:amd64 is not configured yet.
dpkg: error processing package default-jre (--configure):
dependency problems - leaving unconfigured
Setting up ca-certificates-java (20190405) ...
head: cannot open '/etc/ssl/certs/java/cacerts' for reading: No such file or directory
我的Dockerfile非常简单,但它就是不起作用
FROM nginx:latest
RUN apt-get update -y && apt-get install -y \
unzip \
wget \
default-jre \
nginx
它看起来正在使用,任何帮助使它工作将不胜感激。我已经尝试了好几天了。debian buster