如何修复 Java 安装?

如何修复 Java 安装?

我一直在尝试安装 Java 15。几周后,我在 Elementary OS 上顺利安装了它。今天我切换到 Ubuntu 并尝试再次安装它,但这个错误让我抓狂:

download failed
Oracle JDK 15 is NOT installed.
dpkg: error processing package oracle-java15-installer (--configure):
 installed oracle-java15-installer package post-installation script subprocess 
returned error exit status 1
Errors were encountered while processing:
 oracle-java15-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)

我使用了以下命令:

sudo add-apt-repository ppa:linuxuprising/java
sudo apt update
sudo apt install oracle-java15-installer

相关内容