尝试安装任何内容时无法获取错误

尝试安装任何内容时无法获取错误

我首先尝试在终端中下载

$ java
Command 'java' not found, but can be installed with:

sudo apt install openjdk-11-jre-headless  # version 11.0.13+8-0ubuntu1~21.10, or

sudo apt install default-jre              # version 2:1.11-72

sudo apt install openjdk-17-jre-headless  # version 17.0.1+12-1~21.10

sudo apt install openjdk-8-jre-headless   # version 8u312-b07-0ubuntu1~21.10

sudo apt install openjdk-15-jre-headless  # version 15.0.3+3-1

sudo apt install openjdk-16-jre-headless  # version 16.0.1+9-1`

然后我输入

sudo apt install default-jre

它说

E: Failed to fetch http://mirror.ni.net.tr/ubuntu/pool/main/j/java-common/java-common_0.72build1_all.deb  404  Not Found [IP: 95.173.191.11 80]
E: Failed to fetch http://mirror.ni.net.tr/ubuntu/pool/main/o/openjdk-lts/openjdk-11-jre-headless_11.0.13%2b8-0ubuntu1%7e21.10_amd64.deb  404  Not Found [IP: 95.173.191.11 80]
E: Failed to fetch http://mirror.ni.net.tr/ubuntu/pool/main/j/java-common/default-jre-headless_1.11-72build1_amd64.deb  404  Not Found [IP: 95.173.191.11 80]
E: Failed to fetch http://mirror.ni.net.tr/ubuntu/pool/main/o/openjdk-lts/openjdk-11-jre_11.0.13%2b8-0ubuntu1%7e21.10_amd64.deb  404  Not Found [IP: 95.173.191.11 80]
E: Failed to fetch http://mirror.ni.net.tr/ubuntu/pool/main/j/java-common/default-jre_1.11-72build1_amd64.deb  404  Not Found [IP: 95.173.191.11 80]
E: Failed to fetch http://mirror.ni.net.tr/ubuntu/pool/main/j/java-atk-wrapper/libatk-wrapper-java_0.38.0-2ubuntu3_all.deb  404  Not Found [IP: 95.173.191.11 80]
E: Failed to fetch http://mirror.ni.net.tr/ubuntu/pool/main/j/java-atk-wrapper/libatk-wrapper-java-jni_0.38.0-2ubuntu3_amd64.deb  404  Not Found [IP: 95.173.191.11 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

然后我尝试

sudo apt install openjdk-11-jre-headles

但它说

E: Unable to locate package openjdk-11-jre-headles

我刚刚从 Windows 切换过来,正在努力在新安装的 Ubuntu 上安装 Java。如果您能帮助我,我将非常高兴,谢谢。

我发现我现在无法下载任何东西,因为它总是说无法获取。我想我之前搞砸了什么。

答案1

你好,我通过更改下载服务器解决了这个问题,我记得我把默认服务器改成了http://mirror.ni.net.tr但是它不起作用,于是我搜索了最适合我的服务器,那就是 ubuntu.torhost.com,它工作正常,我可以在终端中下载我想要的内容。注:感谢回答我的问题并帮助我的人 :)

相关内容