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
相关推荐
唐青枫16 分钟前
Linux whatis 命令使用详解
linux
在河之洲木水5 小时前
现代多核调度器的本质 调度三重奏
linux·服务器·系统架构
程序员JerrySUN6 小时前
驱动开发硬核特训 · Day 22(下篇): # 深入理解 Power-domain 框架:概念、功能与完整代码剖析
linux·开发语言·驱动开发·嵌入式硬件
白总Server6 小时前
多智能体系统的中间件架构
linux·运维·服务器·中间件·ribbon·架构·github
未来会更好yes6 小时前
Centos 7.6安装redis-6.2.6
linux·redis·centos
二猛子6 小时前
Linux(Centos版本)中安装Docker
linux·docker·centos
浪裡遊8 小时前
跨域问题(Cross-Origin Problem)
linux·前端·vue.js·后端·https·sprint
Johny_Zhao8 小时前
OpenStack 全套搭建部署指南(基于 Kolla-Ansible)
linux·python·信息安全·云计算·openstack·shell·yum源·系统运维
2401_867021908 小时前
文件缓冲区(IO与文件 ·III)(linux/C)
linux·运维·服务器·c语言
刘某的Cloud8 小时前
rabbitmq常用命令
linux·运维·分布式·rabbitmq·系统