[WSL] Solution for the phenomenon that 404 is displayed when trying to insert Java with apt (personal memo)

environment

Windows10 Education 2004 WSL Ubuntu18.04 LTS

phenomenon

I ran the following command to install Java on Ubuntu 18.04 on WSL ...

sudo apt install default-jdk

The installation fails with a 404 error like this.

Ign:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libnss3 amd64 2:3.35-2ubuntu2.11
Err:1 http://security.ubuntu.com/ubuntu bionic-updates/main amd64 libnss3 amd64 2:3.35-2ubuntu2.11
  404  Not Found [IP: 91.189.88.152 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/n/nss/libnss3_3.35-2ubuntu2.11_amd64.deb  404  Not Found [IP: 91.189.88.152 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

apt-get update and apt-get --fix-It says to try missing, so I tried it, but it didn't improve....


 There was an article saying that it was caused by anti-virus software, but it doesn't seem to be relevant because I haven't introduced anything like that.

# Solution
 When I ran the following command, the error disappeared.

sudo apt-get autoclean //This is liver-like sudo apt-get update

 Apparently there are still old files that aren't used, and it's not bad ...
```sudo apt-get autoclean```Seems to be a command to delete such unnecessary files.

# reference
https://qiita.com/kabosu3d/items/0f436ba05df8ac358245
https://qiita.com/Y_Aowashi/items/d355d90945305d925a3c


Recommended Posts

[WSL] Solution for the phenomenon that 404 is displayed when trying to insert Java with apt (personal memo)
Learning memo when learning Java for the first time (personal learning memo)
A warning is displayed when trying to use a huge integer with the special variables $ 1, $ 2, $ 3 ...
Solution that gives an error when trying to connect to DB (MySQL) in Java
Initialize Ruby array with 0 like Java, that is, set the default value to 0
I tried to make a program that searches for the target class from the process that is overloaded with Java
I want to solve the problem that JS is not displayed properly unless reloaded when transitioning with Turbolinks: link_to
A memo to do for the time being when building CentOS 6 series with VirtualBox
[Rails] What to do when the view collapses when a message is displayed with the errors method
Solution for errors that occur when upgrading to Rails 5.2 series
About the solution to the problem that the log of logback is not output when the web application is stopped
How to deal with the type that I thought about writing a Java program for 2 years
[Win10 Home Docker environment memo (WSL2 or vagrant)] How to deal with the problem that the loading time of localhost is abnormally long
When requested access to the resource is denied when pushing with Docker
Countermeasures for forgetting to specify the font when titleTextAttributes is specified
Resolved the error that occurred when trying to use Spark in an environment where Java 8 and Java 11 coexist.
Install Docker with WSL2 Memo ([Part 1] Until WSL2 is installed) * The version that did not follow the official Doc
When calling sshpass from Java with shell etc., it seems that it is necessary to have a path.
Personal memo: Metaprogramming with Java reflection
[IOS] What to do when the image is filled with one color
[Personal memo] How to interact with a random number generator in Java
[First Java] Make something that works with Intellij for the time being
[Introduction to Java] I tried to summarize the knowledge that I think is essential
[Java small story] Monitor when a value is added to the List