```
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
libflashrom1 libftdi1-2
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
ca-certificates-java java-common
Suggested packages:
default-jre fonts-dejavu-extra fonts-ipafont-gothic fonts-ipafont-mincho
fonts-wqy-microhei | fonts-wqy-zenhei
The following NEW packages will be installed:
ca-certificates-java java-common openjdk-19-jre-headless
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 50.4 MB of archives.
After this operation, 203 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://nz.archive.ubuntu.com/ubuntu jammy/main amd64 java-common all 0.72build2 [6,782 B]
Get:2 http://nz.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 openjdk-19-jre-headless amd64 19.0.1+10-1ubuntu1~22.04 [50.4 MB]
Get:3 http://nz.archive.ubuntu.com/ubuntu jammy/main amd64 ca-certificates-java all 20190909 [12.1 kB]
Fetched 50.4 MB in 2s (33.0 MB/s)
Selecting previously unselected package java-common.
(Reading database ... 196551 files and directories currently installed.)
Preparing to unpack .../java-common_0.72build2_all.deb ...
Unpacking java-common (0.72build2) ...
Selecting previously unselected package openjdk-19-jre-headless:amd64.
Preparing to unpack .../openjdk-19-jre-headless_19.0.1+10-1ubuntu1~22.04_amd64.d
eb ...
Unpacking openjdk-19-jre-headless:amd64 (19.0.1+10-1ubuntu1~22.04) ...
Selecting previously unselected package ca-certificates-java.
Preparing to unpack .../ca-certificates-java_20190909_all.deb ...
Unpacking ca-certificates-java (20190909) ...
Setting up java-common (0.72build2) ...
Setting up ca-certificates-java (20190909) ...
head: cannot open '/etc/ssl/certs/java/cacerts' for reading: No such file or dir
ectory
/var/lib/dpkg/info/ca-certificates-java.postinst: line 101: java: command not fo
und
dpkg: error processing package ca-certificates-java (--configure):
installed ca-certificates-java package post-installation script subprocess retu
rned error exit status 127
dpkg: dependency problems prevent configuration of openjdk-19-jre-headless:amd64
:
openjdk-19-jre-headless:amd64 depends on ca-certificates-java (>= 20190405~); h
owever:
Package ca-certificates-java is not configured yet.
dpkg: error processing package openjdk-19-jre-headless:amd64 (--configure):
dependency problems - leaving unconfigured
Processing triggers for man-db (2.10.2-1) ...
No apport report written because the error message indicates its a followup erro
r from a previous failure. Processing triggers for ca-certificates (20211016) ...
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: java: not found
E: /etc/ca-certificates/update.d/jks-keystore exited with code 1.
done.
Errors were encountered while processing:
ca-certificates-java
openjdk-19-jre-headless:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
```
It appears that ca-certificates-java depend on some jre being present on the machine, but for java 19 we have things in slightly wrong order
```
/var/lib/dpkg/info/ca-certificates-java.postinst: line 101: java: command not fo
und
Steps to reproduce:
``` 19-jre- headless
sudo apt install openjdk-
```
``` es-java java-common gothic fonts-ipafont- mincho wqy-microhei | fonts-wqy-zenhei es-java java-common openjdk- 19-jre- headless nz.archive. ubuntu. com/ubuntu jammy/main amd64 java-common all 0.72build2 [6,782 B] nz.archive. ubuntu. com/ubuntu jammy-updates/ universe amd64 openjdk- 19-jre- headless amd64 19.0.1+ 10-1ubuntu1~ 22.04 [50.4 MB] nz.archive. ubuntu. com/ubuntu jammy/main amd64 ca-certificates -java all 20190909 [12.1 kB] common_ 0.72build2_ all.deb ... 19-jre- headless: amd64. 19-jre- headless_ 19.0.1+ 10-1ubuntu1~ 22.04_amd64. d 19-jre- headless: amd64 (19.0.1+ 10-1ubuntu1~ 22.04) ... -java. certificates- java_20190909_ all.deb ... -java (20190909) ... -java (20190909) ... certs/java/ cacerts' for reading: No such file or dir dpkg/info/ ca-certificates -java.postinst: line 101: java: command not fo -java (--configure): -java package post-installation script subprocess retu 19-jre- headless: amd64 19-jre- headless: amd64 depends on ca-certificates -java (>= 20190405~); h -java is not configured yet.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
libflashrom1 libftdi1-2
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
ca-certificat
Suggested packages:
default-jre fonts-dejavu-extra fonts-ipafont-
fonts-
The following NEW packages will be installed:
ca-certificat
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 50.4 MB of archives.
After this operation, 203 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://
Get:2 http://
Get:3 http://
Fetched 50.4 MB in 2s (33.0 MB/s)
Selecting previously unselected package java-common.
(Reading database ... 196551 files and directories currently installed.)
Preparing to unpack .../java-
Unpacking java-common (0.72build2) ...
Selecting previously unselected package openjdk-
Preparing to unpack .../openjdk-
eb ...
Unpacking openjdk-
Selecting previously unselected package ca-certificates
Preparing to unpack .../ca-
Unpacking ca-certificates
Setting up java-common (0.72build2) ...
Setting up ca-certificates
head: cannot open '/etc/ssl/
ectory
/var/lib/
und
dpkg: error processing package ca-certificates
installed ca-certificates
rned error exit status 127
dpkg: dependency problems prevent configuration of openjdk-
:
openjdk-
owever:
Package ca-certificates
dpkg: error processing package openjdk- 19-jre- headless: amd64 (--configure):
Processing triggers for ca-certificates (20211016) ... certificates/ update. d...
dependency problems - leaving unconfigured
Processing triggers for man-db (2.10.2-1) ...
No apport report written because the error message indicates its a followup erro
r from a previous failure.
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-
/etc/ca- certificates/ update. d/jks-keystore: 82: java: not found certificates/ update. d/jks-keystore exited with code 1. s-java 19-jre- headless: amd64
E: /etc/ca-
done.
Errors were encountered while processing:
ca-certificate
openjdk-
E: Sub-process /usr/bin/dpkg returned an error code (1)
```
It appears that ca-certificates -java depend on some jre being present on the machine, but for java 19 we have things in slightly wrong order
``` dpkg/info/ ca-certificates -java.postinst: line 101: java: command not fo
/var/lib/
und
```