运行 sudo apt-get update 时出现以下错误,请协助清除签名的文件无效,出现“NOSPLIT”

运行 sudo apt-get update 时出现以下错误,请协助清除签名的文件无效,出现“NOSPLIT”
Get:16 http://packages.microsoft.com/repos/code stable InRelease [9,890 B]     
Err:16 http://packages.microsoft.com/repos/code stable InRelease               
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Hit:17 https://packages.microsoft.com/repos/ms-teams stable InRelease          
Reading package lists... Done                                                  
E: Failed to fetch http://packages.microsoft.com/repos/code/dists/stable/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
E: The repository 'http://packages.microsoft.com/repos/code stable InRelease' is no longer signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

这发生在完全更新的 Ubuntu 20.04 上,昨天正常的系统更新命令运行正常

答案1

该 repo 最近已更改,您只需要在 /etc/apt/sources.list.d/vscode.list 中将“vscode”更改为“code”或在您网站上调用的任何名称。

参考:https://github.com/microsoft/vscode/blob/e7647291206dbe540c0d5121889b4f9f9c9d43f7/resources/linux/debian/postinst.template#L43-L55

相关内容