You need to install them together. I go through the process below.
Reproduced the error:
$ sudo dpkg -i jdk-17.0.1_linux-x64_bin.deb
(Reading database ... 181449 files and directories currently installed.)
Preparing to unpack jdk-17.0.1_linux-x64_bin.deb ...
Unpacking jdk-17 (17.0.1-ga) over (17.0.1-ga) ...
dpkg: dependency problems prevent configuration of jdk-17:
jdk-17 depends on libc6-i386; however:
Package libc6-i386 is not installed.
jdk-17 depends on libc6-x32; however:
Package libc6-x32 is not installed.
dpkg: error processing package jdk-17 (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
jdk-17
Solution:
$ sudo apt-get install libc6-i386 libc6-x32
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
systemd-hwe-hwdb
Use 'sudo apt autoremove' to remove it.
The following NEW packages will be installed:
libc6-i386 libc6-x32
0 to upgrade, 2 to newly install, 0 to remove and 99 not to upgrade.
1 not fully installed or removed.
Need to get 5,815 kB of archives.
After this operation, 25.4 MB of additional disk space will be used.
Get:1 http://au.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libc6-i386 amd64 2.35-0ubuntu3.1 [2,837 kB]
Get:2 http://au.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libc6-x32 amd64 2.35-0ubuntu3.1 [2,978 kB]
Fetched 5,815 kB in 1s (5,290 kB/s)
Selecting previously unselected package libc6-i386.
(Reading database ... 181449 files and directories currently installed.)
Preparing to unpack .../libc6-i386_2.35-0ubuntu3.1_amd64.deb ...
Unpacking libc6-i386 (2.35-0ubuntu3.1) ...
Selecting previously unselected package libc6-x32.
Preparing to unpack .../libc6-x32_2.35-0ubuntu3.1_amd64.deb ...
Unpacking libc6-x32 (2.35-0ubuntu3.1) ...
Setting up libc6-x32 (2.35-0ubuntu3.1) ...
Setting up libc6-i386 (2.35-0ubuntu3.1) ...
Setting up jdk-17 (17.0.1-ga) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
Confirmation:
$ sudo dpkg -i jdk-17.0.1_linux-x64_bin.deb
(Reading database ... 182019 files and directories currently installed.)
Preparing to unpack jdk-17.0.1_linux-x64_bin.deb ...
Unpacking jdk-17 (17.0.1-ga) over (17.0.1-ga) ...
Setting up jdk-17 (17.0.1-ga) ...