Sudo apt-get 在 18.04 中不起作用

Sudo apt-get 在 18.04 中不起作用

首先,我浏览了与此错误相关的所有先前问题,但都无济于事。以下是我的输出sudo apt-get update

根据一篇旧帖子,我最终更改了我的整个sources.list文件。

Get:1 http://archive.canonical.com/ubuntu xenial InRelease [3,537 B]
Err:1 http://archive.canonical.com/ubuntu xenial InRelease                     
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Get:2 http://archive.ubuntu.com/ubuntu xenial InRelease [3,534 B]              
Err:2 http://archive.ubuntu.com/ubuntu xenial InRelease
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [3,542 B]
Err:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Get:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [3,544 B]
Err:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Get:5 http://archive.ubuntu.com/ubuntu xenial-security InRelease [3,543 B]
Err:5 http://archive.ubuntu.com/ubuntu xenial-security InRelease
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Reading package lists... Done  
N: See apt-secure(8) manpage for repository creation and user configuration details.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
E: The repository 'http://archive.canonical.com/ubuntu xenial InRelease' is not signed.
E: Failed to fetch http://archive.canonical.com/ubuntu/dists/xenial/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
N: See apt-secure(8) manpage for repository creation and user configuration details.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
E: The repository 'http://archive.ubuntu.com/ubuntu xenial InRelease' is not signed.
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
N: See apt-secure(8) manpage for repository creation and user configuration details.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
E: The repository 'http://archive.ubuntu.com/ubuntu xenial-updates InRelease' is not signed.
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-backports/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
E: The repository 'http://archive.ubuntu.com/ubuntu xenial-backports InRelease' is not 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.
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-security/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
E: The repository 'http://archive.ubuntu.com/ubuntu xenial-security InRelease' is not 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.

答案1

不幸的是,问题出在我所在的大学网络,我使用手机热点后就好了。“太棒了”

答案2

看起来从 16.04 升级到 18.04 弄乱了您的源列表。/etc/apt/sources.list用以下行替换文件中的现有内容。备份并删除现有的其他源列表以/etc/apt/sources.list.d/避免任何冲突。

#------------------------------------------------------------------------------#
#                            OFFICIAL UBUNTU REPOS                             #
#------------------------------------------------------------------------------#


###### Ubuntu Main Repos
deb http://in.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse 

###### Ubuntu Update Repos
deb http://in.archive.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse 
deb http://in.archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse

追上sudo apt update它。问题应该解决了。

答案3

使用此命令查找你的 ubuntu 代号

lsb_release -a

然后编辑你的 repo 列表并使用以下代码取消注释该代号的链接:

sudo nano /etc/apt/sources.list

现在检查sudo apt-get update

相关内容