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 openjdk

分享到:
评论加载中,请稍后...
创APP如搭积木 - 创意无限,梦想即时!
回到顶部