Debain JDK8 安装
首先请安装依赖:
shell
sudo apt-get update && sudo apt-get install -y wget apt-transport-https
然后信任 GPG 公钥:
shell
wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | sudo tee /etc/apt/keyrings/adoptium.asc
随后执行以下命令来添加 apt 存储库:
shell
echo "deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://mirrors.tuna.tsinghua.edu.cn/Adoptium/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | sudo tee /etc/apt/sources.list.d/adoptium.list
再执行
shell
sudo apt-get update
安装jdk8
shell
apt-get install temurin-8-jdk
之后可以使用 apt-get install temurin-<version>-jdk
安装软件包,例如 temurin-17-jdk
和 temurin-8-jdk
。