에러해결: /etc/ca-certificates/update.d/jks-keystore: java: not found, dpkg: error processing package openjdk-17-jdk:amd64 (--configure):
2023. 2. 25. 21:42상황
OPEN JDK 17을 설치하려고 아래의 명령어를 입력했다.
$ apt-get install openjdk-17-jdk
하지만, 아래의 에러가 발생한 상황
문제/에러명
Get:130 http://archive.ubuntu.com/ubuntu bionic/main amd64 libgail18 amd64 2.24.32-1ubuntu1 [14.2 kB]
Get:131 http://archive.ubuntu.com/ubuntu bionic/main amd64 libgail-common amd64 2.24.32-1ubuntu1 [112 kB]
dependency problems - leaving unconfigured
Setting up ubuntu-mono (16.10+18.04.20181005-0ubuntu1) ...
dpkg: dependency problems prevent configuration of openjdk-17-jdk:amd64:
openjdk-17-jdk:amd64 depends on openjdk-17-jre (= 17.0.5+8-2ubuntu1~18.04); however:
Package openjdk-17-jre:amd64 is not configured yet.
openjdk-17-jdk:amd64 depends on openjdk-17-jdk-headless (= 17.0.5+8-2ubuntu1~18.04); however:
Package openjdk-17-jdk-headless:amd64 is not configured yet.
dpkg: error processing package openjdk-17-jdk:amd64 (--configure):
dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.27-3ubuntu1.6) ...
Processing triggers for ca-certificates (20211016ubuntu0.18.04.1) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
/etc/ca-certificates/update.d/jks-keystore: 82: /etc/ca-certificates/update.d/jks-keystore: java: not found
E: /etc/ca-certificates/update.d/jks-keystore exited with code 1.
done.
Processing triggers for libgdk-pixbuf2.0-0:amd64 (2.36.11-2) ...
Errors were encountered while processing:
ca-certificates-java
openjdk-17-jre-headless:amd64
openjdk-17-jre:amd64
openjdk-17-jdk-headless:amd64
openjdk-17-jdk:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
주요 에러명
Package openjdk-17-jre:amd64 is not configured yet.
해결방안
설치하기 전에 아래의 명령어를 입력해준다.
mkdir -p /usr/share/man/man1
사족이지만, 도커 이미지 개발자는,
아래의 스크립트를 추가로 넣어주는게 좋다.
RUN mkdir /usr/share/man/man1/
참고한 자료
- Ubuntu 18.04 JDK install failing because of weird dependency issues #64
https://github.com/geerlingguy/ansible-role-java/issues/64
시간을 절약했다면 아래의 좋아요