ubuntu20.04系统openjdk11变更openjdk-8-jdk
一、卸载openjdk11
先检查是否安装,命令:dpkg --list | grep -i jdk
移除openjdk包,命令:sudo apt-get purge openjdk*
卸载 OpenJDK 相关包,命令:sudo apt-get purge icedtea-* openjdk-*
再次检查是否卸载成功,命令:dpkg --list | grep -i jdk
二、安装openjdk-8-jdk
sudo apt install openjdk-8-jdk
三、遇到问题解决:
dpkg 处理归档时出错的解决办法
dpkg: 处理归档 /var/cache/apt/archives/xxxxxx(–unpack)时出错
尝试以下方法解决:
dpkg -i --force-overwrite /var/cache/apt/archives/xxxxxx
具体如下:sudo dpkg -i --force-overwrite /var/cache/apt/archives/vim-runtime_2%3a8.1.2269-1ubuntu5.9_all.deb
标签:ubuntu20.04,jdk,openjdk,sudo,apt,openjdk11,dpkg From: https://www.cnblogs.com/miaojx/p/16831209.html