1.Introduction
My past article **How to install openjdk-8-jdk on Raspbian Buster armhfandHowtoinstallopenjdk-8-jdkonDebianBuster(Debian10)armhf**procedurerequiredinstallinganunstable"sid"package,whichcausedglibc2.29tobeinstalledwithoutpermission.ThistimeIwilldescribetheprocedureforinstallingopenjdk-8-jdkwithoutinstallingtheunstable"sid"packageandkeepingthewholeenvironmentcorrect.ThestandardglibcforRaspbianBuster(Debian10) is glibc2.28
. Note that openjdk-8-jdk is required to build Bazel.
2.Environment
3.Procedure
Advance_preparation
$ cd ~
$ sudo apt-get update
$ sudo apt-get install -y \
apt-transport-https ca-certificates \
wget dirmngr gnupg software-properties-common
$ wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -
$ sudo nano /etc/apt/sources.list
### Add the following line to the last line
deb https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ buster main Release
Ctrl + O Ctrl + X
Install_openjdk-8-jdk
### A warning message appears several times, but you can ignore it.
$ sudo apt-get update
$ sudo apt-get install adoptopenjdk-8-hotspot
$ sudo nano /etc/apt/sources.list
### Delete the following line to the last line
deb https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ buster main Release
Ctrl + O Ctrl + X
Update_package_list
$ sudo apt-get update
4.Appendix You can also try the standalone installer with a deb file.
For_armhf
$ curl -sc /tmp/cookie "https://drive.google.com/uc?export=download&id=1LQUSal55R6fmawZS9zZuk6-5ZFOdUqRK" > /dev/null
$ CODE="$(awk '/_warning_/ {print $NF}' /tmp/cookie)"
$ curl -Lb /tmp/cookie "https://drive.google.com/uc?export=download&confirm=${CODE}&id=1LQUSal55R6fmawZS9zZuk6-5ZFOdUqRK" -o adoptopenjdk-8-hotspot_8u222-b10-2_armhf.deb
$ sudo apt-get install -y ./adoptopenjdk-8-hotspot_8u222-b10-2_armhf.deb
For_aarch64
$ curl -sc /tmp/cookie "https://drive.google.com/uc?export=download&id=1VwLxzT3EOTbhSzwvRF2H4ChTQyTQBt3x" > /dev/null
$ CODE="$(awk '/_warning_/ {print $NF}' /tmp/cookie)"
$ curl -Lb /tmp/cookie "https://drive.google.com/uc?export=download&confirm=${CODE}&id=1VwLxzT3EOTbhSzwvRF2H4ChTQyTQBt3x" -o adoptopenjdk-8-hotspot_8u222-b10-2_arm64.deb
$ sudo apt-get install -y ./adoptopenjdk-8-hotspot_8u222-b10-2_arm64.deb
5.Reference articles
https://linuxize.com/post/install-java-on-debian-10/#installing-openjdk-8 https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/pool/main/a/adoptopenjdk-8-hotspot/
Recommended Posts