Debian/Linux下安装OpenJDK8
清泛原创
因为Debian11的源里不再带OpenJDK8了,需要手工来安装。
下载安装包
因为手工安装,所以部分依赖包需要自己下载。
wget http://snapshot.debian.org/archive/debian-security/20220210T090326Z/pool/updates/main/o/openjdk-8/openjdk-8-jdk_8u322-b06-1~deb9u1_amd64.deb
wget http://snapshot.debian.org/archive/debian-security/20220210T090326Z/pool/updates/main/o/openjdk-8/openjdk-8-jdk-headless_8u322-b06-1~deb9u1_amd64.deb
wget http://snapshot.debian.org/archive/debian-security/20220210T090326Z/pool/updates/main/o/openjdk-8/openjdk-8-jre-headless_8u322-b06-1~deb9u1_amd64.deb
wget http://snapshot.debian.org/archive/debian-security/20220210T090326Z/pool/updates/main/o/openjdk-8/openjdk-8-jre_8u322-b06-1~deb9u1_amd64.deb
执行安装
依次安装,前面是依赖包,包含下载的包和系统源中有的包,最后安装OPenJDK8包。
apt --fix-broken install
dpkg -i openjdk-8-jre-headless_8u322-b06-1~deb9u1_amd64.deb
dpkg -i openjdk-8-jdk-headless_8u322-b06-1~deb9u1_amd64.deb
dpkg -i openjdk-8-jre_8u322-b06-1~deb9u1_amd64.deb
dpkg -i openjdk-8-jdk_8u322-b06-1~deb9u1_amd64.deb
上一篇:Linux/Debian安装Java
下一篇:【解决】Java报错:Implicit super constructor Object() is undefined for default constructor. Must define an explicit constructor