在执行sudo apt update的时候发现有Ing,error类似的错误,我的情况如下:
rr:1 https://linux.teamviewer.com/deb stable InRelease
Invalid response from proxy: HTTP/1.1 403 Forbidden Cache-Control: no-cache Pragma: no-cache Content-Type: text/html; charset=utf-8 Proxy-Connection: Keep-Alive Connection: Keep-Alive Content-Length: 2565 [IP: 137.153.66.14 10080]
Hit:2 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Get:3 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:4 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Hit:5 http://ppa.launchpad.net/lttng/stable-2.12/ubuntu bionic InRelease
Ign:6 http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu bionic InRelease
Get:8 http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu bionic Release [3,798 B]
Ign:7 https://nuts.vysor.io/apt ./ InRelease
Get:9 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:10 http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu bionic Release.gpg [833 B]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [2,326 kB]
Get:13 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [1,981 kB]
Get:14 http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu bionic/main amd64 Packages [776 kB]
Ign:11 https://nuts.vysor.io/apt ./ Release
Ign:15 https://nuts.vysor.io/apt ./ Packages
Get:18 http://packages.microsoft.com/repos/code stable InRelease [10.4 kB]
Get:19 http://packages.microsoft.com/repos/code stable/main armhf Packages [57.7 kB]
Ign:16 https://nuts.vysor.io/apt ./ Translation-en
Get:20 http://packages.microsoft.com/repos/code stable/main arm64 Packages [58.0 kB]
Get:21 http://packages.microsoft.com/repos/code stable/main amd64 Packages [57.1 kB]
Get:22 http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu bionic/main i386 Packages [26.4 kB]
Ign:17 https://nuts.vysor.io/apt ./ Translation-en_US
Get:23 http://us.archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages [1,386 kB]
Ign:15 https://nuts.vysor.io/apt ./ Packages
Get:24 http://security.ubuntu.com/ubuntu bionic-security/main i386 Packages [1,080 kB]
Ign:16 https://nuts.vysor.io/apt ./ Translation-en
Ign:17 https://nuts.vysor.io/apt ./ Translation-en_US
Ign:15 https://nuts.vysor.io/apt ./ Packages
Get:25 http://us.archive.ubuntu.com/ubuntu bionic-updates/main Translation-en [448 kB]
Ign:16 https://nuts.vysor.io/apt ./ Translation-en
Get:26 http://security.ubuntu.com/ubuntu bionic-security/main Translation-en [355 kB]
Ign:17 https://nuts.vysor.io/apt ./ Translation-en_US
Get:27 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 DEP-11 Metadata [293 kB]
Get:28 http://security.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [50.3 kB]
Get:29 http://security.ubuntu.com/ubuntu bionic-security/restricted i386 Packages [23.2 kB]
Ign:15 https://nuts.vysor.io/apt ./ Packages
Get:30 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [534 kB]
Get:31 http://us.archive.ubuntu.com/ubuntu bionic-updates/main DEP-11 48x48 Icons [82.9 kB]
Get:32 http://security.ubuntu.com/ubuntu bionic-security/restricted Translation-en [72.4 kB]
Ign:16 https://nuts.vysor.io/apt ./ Translation-en
Get:33 http://us.archive.ubuntu.com/ubuntu bionic-updates/main DEP-11 64x64 Icons [154 kB]
Get:34 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [1,151 kB]
Ign:17 https://nuts.vysor.io/apt ./ Translation-en_US
Get:35 http://us.archive.ubuntu.com/ubuntu bionic-updates/restricted i386 Packages [29.9 kB]
Get:36 http://security.ubuntu.com/ubuntu bionic-security/universe i386 Packages [996 kB]
Get:37 http://us.archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [558 kB]
Ign:15 https://nuts.vysor.io/apt ./ Packages
Get:38 http://security.ubuntu.com/ubuntu bionic-security/universe Translation-en [265 kB]
Get:39 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [59.0 kB]
Get:40 http://us.archive.ubuntu.com/ubuntu bionic-updates/restricted Translation-en [76.0 kB]
Ign:16 https://nuts.vysor.io/apt ./ Translation-en
Get:41 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1,768 kB]
Get:42 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2,464 B]
Ign:17 https://nuts.vysor.io/apt ./ Translation-en_US
Ign:15 https://nuts.vysor.io/apt ./ Packages
Ign:16 https://nuts.vysor.io/apt ./ Translation-en
Ign:17 https://nuts.vysor.io/apt ./ Translation-en_US
Get:15 https://nuts.vysor.io/apt ./ Packages [3,720 B]
Ign:16 https://nuts.vysor.io/apt ./ Translation-en
Ign:17 https://nuts.vysor.io/apt ./ Translation-en_US
Get:43 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe i386 Packages [1,590 kB]
Get:44 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe Translation-en [382 kB]
Get:45 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 DEP-11 Metadata [300 kB]
Get:46 http://us.archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 DEP-11 Metadata [2,464 B]
Get:47 http://us.archive.ubuntu.com/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [9,272 B]
Fetched 17.2 MB in 38s (456 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
105 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Failed to fetch https://linux.teamviewer.com/deb/dists/stable/InRelease Invalid response from proxy: HTTP/1.1 403 Forbidden Cache-Control: no-cache Pragma: no-cache Content-Type: text/html; charset=utf-8 Proxy-Connection: Keep-Alive Connection: Keep-Alive Content-Length: 2565 [IP: 137.153.66.14 10080]
W: Some index files failed to download. They have been ignored, or old ones used instead.
遇到这样类似的错误,第一步先看一下以下的路径是否有内容:
ls /etc/apt/sources.list.d
teamviewer.list vysor.list vscode.list vysor.list.save
ros-latest.list vscode.list.save
如果有,备份一下该文件夹的内容, 然后清空这个文件夹
sudo rm /etc/apt/sources.list.d/*
如果还是更新有错误,再清空一下
sudo /var/lib/apt/list/*
这个文件夹
再执行sudo apt update就没问题了