卸载 Java 8 openjdk-8-jre-headless 以升级到 openjdk-11-jre-headless

卸载 Java 8 openjdk-8-jre-headless 以升级到 openjdk-11-jre-headless

我尝试了多种删除软件包的方法。 apt 删除 openjdk-8-jre-headless,apt purge openjdk-8-jre-headless,我尝试过 dpkg-l | grep openjdk 查找列出的软件包,每次我发出删除软件包的命令时,它都想更新它们但失败了。许多链接都不存在,我尝试过 apt autoremove - 但系统仍然有 java 版本

root@unifijet2:~# java -version
openjdk version "1.8.0_312"
OpenJDK Runtime Environment (build 1.8.0_312-8u312-b07-0ubuntu1~21.10-b07)
OpenJDK 64-Bit Server VM (build 25.312-b07, mixed mode)
root@unifijet2:~# sudo apt purge openjdk-8-jre-headless
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  jsvc libcommons-daemon-java libxi6 libxrender1 libxtst6 x11-common
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libasound2 libasound2-data libgraphite2-3 libharfbuzz0b openjdk-17-jre-headless unifi
Suggested packages:
  libasound2-plugins alsa-utils libnss-mdns fonts-ipafont-gothic fonts-ipafont-mincho fonts-wqy-microhei
  | fonts-wqy-zenhei fonts-indic
Recommended packages:
  alsa-ucm-conf alsa-topology-conf
The following packages will be REMOVED:
  openjdk-8-jre-headless*
The following NEW packages will be installed:
  libasound2 libasound2-data libgraphite2-3 libharfbuzz0b openjdk-17-jre-headless
The following packages will be upgraded:
  unifi
1 upgraded, 5 newly installed, 1 to remove and 38 not upgraded.
Need to get 808 kB/197 MB of archives.
After this operation, 112 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Err:1 http://archive.ubuntu.com/ubuntu impish-updates/main amd64 libasound2-data all 1.2.4-1.1ubuntu3.1
  404  Not Found [IP: 185.125.190.36 80]
Err:2 http://archive.ubuntu.com/ubuntu impish-updates/main amd64 libasound2 amd64 1.2.4-1.1ubuntu3.1
  404  Not Found [IP: 185.125.190.36 80]
Err:3 http://archive.ubuntu.com/ubuntu impish/main amd64 libgraphite2-3 amd64 1.3.14-1
  404  Not Found [IP: 185.125.190.36 80]
Err:4 http://archive.ubuntu.com/ubuntu impish/main amd64 libharfbuzz0b amd64 2.7.4-1ubuntu1
  404  Not Found [IP: 185.125.190.36 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/a/alsa-lib/libasound2-data_1.2.4-1.1ubuntu3.1_all.deb  404  Not Found [IP: 185.125.190.36 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/a/alsa-lib/libasound2_1.2.4-1.1ubuntu3.1_amd64.deb  404  Not Found [IP: 185.125.190.36 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/graphite2/libgraphite2-3_1.3.14-1_amd64.deb  404  Not Found [IP: 185.125.190.36 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/h/harfbuzz/libharfbuzz0b_2.7.4-1ubuntu1_amd64.deb  404  Not Found [IP: 185.125.190.36 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
root@unifijet2:~# java -version
openjdk version "1.8.0_312"
OpenJDK Runtime Environment (build 1.8.0_312-8u312-b07-0ubuntu1~21.10-b07)
OpenJDK 64-Bit Server VM (build 25.312-b07, mixed mode)

相关内容