Debian执行apt-get update提示失败,apt-get upgdate不能被用来加入新的盘片

First Post:

Last Update:

Word Count:
487

Read Time:
2 min

1
sudo gedit /etc/apt/sources.list

替换镜像源,注释掉原有的镜像源,这里存放了阿里云、腾讯云、网易三个镜像源,只启用阿里云的镜像源,如下修改:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# deb cdrom:[Debian GNU/Linux 11.3.0 _Bullseye_ - Official amd64 DVD Binary-1 20220326-11:23]/ bullseye contrib main

#deb cdrom:[Debian GNU/Linux 11.3.0 _Bullseye_ - Official amd64 DVD Binary-1 20220326-11:23]/ bullseye contrib main

#deb http://security.debian.org/debian-security bullseye-security main contrib
#deb-src http://security.debian.org/debian-security bullseye-security main contrib

# bullseye-updates, to get updates before a point release is made;
# see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
# A network mirror was not selected during install. The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.
#
# deb http://deb.debian.org/debian/ bullseye-updates main contrib
# deb-src http://deb.debian.org/debian/ bullseye-updates main contrib


#Aliyun Apt Source 阿里云镜像源
deb http://mirrors.aliyun.com/debian/ bullseye main contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye main contrib
deb http://mirrors.aliyun.com/debian/ bullseye-updates main contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye-updates main contrib
deb http://mirrors.aliyun.com/debian/ bullseye-backports main contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye-backports main contrib
deb http://mirrors.aliyun.com/debian/ bullseye-proposed-updates main contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye-proposed-updates main contrib


#Tencent Apt Source 腾讯云镜像源
#deb https://mirrors.tencent.com/debian/ bullseye main non-free contrib
#deb-src https://mirrors.tencent.com/debian/ bullseye main non-free contrib
#deb https://mirrors.tencent.com/debian-security/ bullseye-security main
#deb-src https://mirrors.tencent.com/debian-security/ bullseye-security main
#deb https://mirrors.tencent.com/debian/ bullseye-updates main non-free contrib
#deb-src https://mirrors.tencent.com/debian/ bullseye-updates main non-free contrib
#deb https://mirrors.tencent.com/debian/ bullseye-backports main non-free contrib
#deb-src https://mirrors.tencent.com/debian/ bullseye-backports main non-free contrib

#163 Apt Source 网易镜像源
#deb https://mirrors.163.com/debian/ bullseye main non-free contrib
#deb-src https://mirrors.163.com/debian/ bullseye main non-free contrib
#deb https://mirrors.163.com/debian-security/ bullseye-security main
#deb-src https://mirrors.163.com/debian-security/ bullseye-security main
#deb https://mirrors.163.com/debian/ bullseye-updates main non-free contrib
#deb-src https://mirrors.163.com/debian/ bullseye-updates main non-free contrib
#deb https://mirrors.163.com/debian/ bullseye-backports main non-free contrib
#deb-src https://mirrors.163.com/debian/ bullseye-backports main non-free contrib

最后执行:

1
sudo apt-get upgrade