(base) rahul0324@rahul0324-Predator-G3-572:~$ sudo apt update
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://dl.google.com/linux/chrome/deb stable Release
Hit:3 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic InRelease
Hit:5 https://packages.microsoft.com/repos/vscode stable InRelease
Err:6 http://archive.ubuntu.com/ubuntu bionic InRelease
Could not connect to in.archive.ubuntu.com:80 (10.8.0.100), connection timed out
Err:7 http://in.archive.ubuntu.com/ubuntu bionic-updates InRelease
Unable to connect to in.archive.ubuntu.com:http:
Err:8 http://in.archive.ubuntu.com/ubuntu bionic-backports InRelease
Unable to connect to in.archive.ubuntu.com:http:
Err:9 http://in.archive.ubuntu.com/ubuntu bionic-security InRelease
Unable to connect to in.archive.ubuntu.com:http:
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/bionic/InRelease Could not connect to in.archive.ubuntu.com:80 (10.8.0.100), connection timed out
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease Unable to connect to in.archive.ubuntu.com:http:
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease Unable to connect to in.archive.ubuntu.com:http:
W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/bionic-security/InRelease Unable to connect to in.archive.ubuntu.com:http:
W: Some index files failed to download. They have been ignored, or old ones used instead.
来源列表
deb http://archive.ubuntu.com/ubuntu bionic main restricted
deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted
deb http://archive.ubuntu.com/ubuntu bionic universe
deb http://archive.ubuntu.com/ubuntu bionic-updates universe
deb http://archive.ubuntu.com/ubuntu bionic multiverse
deb http://archive.ubuntu.com/ubuntu bionic-updates multiverse
deb http://in.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://in.archive.ubuntu.com/ubuntu/ bionic-security main restricted
deb http://in.archive.ubuntu.com/ubuntu/ bionic-security universe
deb http://in.archive.ubuntu.com/ubuntu/ bionic-security multiverse
deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main
注意 - 我已经通过更改软件和更新中的“下载自”进行了检查。
答案1
看起来您在源列表中尝试使用的镜像不准确或不活跃。查看下面的网页可能会有所帮助,并找到您所在的国家/地区和您应该使用的镜像 URL。这将是我的起点,因为根据您的 apt update 输出,其他所有内容似乎都在正确下载。
答案2
答案3
我尝试重置来源/etc/apt/sources.list
并且成功了。
请按照下列步骤操作:
- 通过以下方式检查你的 Ubuntu 版本
lsb_release -r
- 由此
http://repogen.simplylinux.ch/
产生一个新的sources.list
- 选择您的国家并发布
- 勾选前 12 个框
- 生成并复制您的新列表
- 将旧文件备份到 sources.list.backup
sudo mv /etc/apt/sources.list /etc/apt/sources.list.backup
- 现在打开编辑器并保存新列表
sudo vi /etc/apt/sources.list
- 再试一次
sudo apt update
:)