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
相关推荐
木木em哈哈7 分钟前
记一次在线编辑器的探索
linux·服务器·网络
我要成为嵌入式大佬23 分钟前
正点原子MP157--问题详解--二(NFS挂载根文件系统双网卡设置)
linux·服务器·网络
一个有温度的技术博主1 小时前
网安实验系列七:域名收集
linux·运维·服务器
我爱学习好爱好爱1 小时前
Ansible 环境搭建
linux·运维·ansible
人工智能训练1 小时前
从 1.1.3 到 1.13.2!Ubuntu 24.04 上 Dify 升级保姆级教程(零数据丢失 + 一键迁移)
linux·运维·人工智能·windows·ubuntu·dify
我要成为嵌入式大佬2 小时前
正点原子MP157--问题详解--四(关于根文件系统驱动模块指令的注意事项)
linux·运维·服务器
feng68_2 小时前
Redis架构实践
linux·运维·redis·架构·bootstrap
欧云服务器2 小时前
宝塔计划任务怎么自动删除多少个以外的文件?
linux·运维·服务器
吴声子夜歌2 小时前
TypeScript——模块解析
javascript·ubuntu·typescript
XXOOXRT2 小时前
零基础掌握Linux常用命令
linux·运维·服务器