Ubuntu执行sudo apt-get update失败的解决方法

Ubuntu版本:24.04.1

报错信息:

bash 复制代码
Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)

如果你在执行以上命令的时候也出现了上面这样的错误提示,先检查一下是不是网络问题,如果确定不是,可以尝试一下我这个解决办法。

这个错误说明目前使用的下载源不能用,这个时候可以尝试一下换源,具体命令如下:

bash 复制代码
sudo cd /etc/apt/sources.list.d
sudo cp sources.list.d sources.list.d.bak
sodu vi sources.list.d

这里需要注意的是,ubuntu24的源配置文件路径已经改为了/etc/apt/sources.list.d,源配置文件为sources.list.d;而之前版本的Ubuntu源配置文件路径是/etc/apt,源配置文件为sources.list。

bash 复制代码
#清华源
Types: deb
URIs: http://mirrors.tuna.tsinghua.edu.cn/ubuntu/
Suites: noble noble-updates noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

将以上内容粘贴到打开的sources.list.d文件中(PS:可以将之前的源码注释掉),然后关闭文本编辑器,更新源。

bash 复制代码
sudo apt-get update

一些其他国内源:

bash 复制代码
#中科大源
Types: deb
URIs: http://mirrors.ustc.edu.cn/ubuntu/
Suites: noble noble-updates noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
bash 复制代码
#阿里云
Types: deb
URIs: http://mirrors.aliyun.com/ubuntu/
Suites: noble noble-updates noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
bash 复制代码
#网易163
Types: deb
URIs: http://mirrors.163.com/ubuntu/
Suites: noble noble-updates noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
相关推荐
bush46 小时前
嵌入式linux学习记录七,中断
linux·嵌入式
RisunJan7 小时前
Linux命令-nologin(用于系统账户或需要禁止交互式登录的场景)
linux·运维
是阿建吖!7 小时前
【Linux】信号
android·linux·c语言·c++
城北徐宫7 小时前
Linux信号深度解剖:5种产生、3张表、4次切换
linux·c++·学习
倔强的石头1067 小时前
【Linux指南】Linux快捷键与系统实用技巧
linux·运维·服务器
番茄地瓜7 小时前
Linux 配置静态 IP 步骤
linux·运维·服务器
liulilittle7 小时前
论 Linux 内核态全局稳态带宽的卡尔曼估计与工程实现
linux·服务器·网络·c++·计算机网络·tcp·通信
Irissgwe8 小时前
五、应用层协议HTTP
linux·网络·网络协议·http·状态码·url
.千余8 小时前
【Linux】 传输层协议UDP:从端口号到传输机制
linux·运维·udp
囚~徒~9 小时前
轻量化的虚拟机
linux·运维·服务器