我已经安装了 openjdk-11 64 位,但是我需要安装 32 位版本
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal
$ java -version
openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)
$ update-java-alternatives --list
java-1.11.0-openjdk-amd64 1111 /usr/lib/jvm/java-1.11.0-openjdk-amd64
我尝试运行:
$ sudo apt-get install openjdk-11-jdk:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package openjdk-11-jdk:i386
如何安裝它?
答案1
您可能没有i386
启用架构。请执行以下操作:
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install openjdk-11-jdk:i386