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
相关推荐
Lw老王要学习21 分钟前
CentOS 7.9达梦数据库安装全流程解析
linux·运维·数据库·centos·达梦
CRUD酱43 分钟前
CentOS的yum仓库失效问题解决(换镜像源)
linux·运维·服务器·centos
zly35001 小时前
VMware vCenter Converter Standalone 转换Linux系统,出现两个磁盘的处理
linux·运维·服务器
Albert Edison1 小时前
【Python】函数
java·linux·python·pip
General_G2 小时前
Linux中的信号
linux·运维·服务器
诸神缄默不语2 小时前
当无法直接用apt instll时,Linux如何离线安装软件包(以make为例)
linux·运维·服务器
Sivan_Xin2 小时前
拒绝 If-Else 屎山:利用适配器模式(Adapter)构建第三方登录的“防腐层”实战
linux·python·适配器模式
learning-striving2 小时前
kali默认桌面Xfce切换为GNOME桌面
linux·运维·服务器·kali
源远流长jerry2 小时前
dpdk之kni处理dns案例
linux·网络·网络协议·ubuntu·ip
黄昏晓x2 小时前
Linux----进程控制
android·linux·运维