[Newly installed ubuntu22.04 cannot apt install software? Various resource not found errors? -哔哩哔哩] https://b23.tv/DtWaLDj
For details, please see the above video. I tossed all afternoon and finally found the solution at station B. I will record it here, and hope that people who encounter the same problem as me can avoid detours.
Problem: Newly installed Ubuntu22.04, the apt installation software can't find the installation package, and can't update itself. I followed many articles on CSDN and even deleted and rebuilt the virtual machine, but it still can't be solved. Finally, I found a suitable solution at Station B and modified the source server. The following are the steps to solve it:
Step 1: Enter software-properties-gtk in the terminal
A window pops up:
Click on other sites to download from
Click to choose the best server
The orange bar is the best server selected by the system, click on the lower right corner to select the server
Enter your identity password, then close the window and select Reload
Step 2: Terminal input sudo apt update
enter your password
Step 3: Terminal input sudo apt upgrade
A large string of codes downloaded here is omitted
To do you want to execute, enter y
The picture below is the last part of the download, which can be used as a reference comparison
At this point, this problem is completely solved, try to enter sudo apt-get install tree in the terminal