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
相关推荐
序属秋秋秋13 分钟前
《Linux系统编程之进程基础》【进程入门】
linux·运维·c语言·c++·进程·系统编程·fork
橘子真甜~38 分钟前
C/C++ Linux网络编程4 - 解决TCP服务器并发的方式
linux·运维·服务器
last demo42 分钟前
Linux 逻辑卷管理
linux·运维·服务器
ll_god1 小时前
ubuntu:beyond compare 4 This license key has been revoked 解决办法
linux·运维·ubuntu
网硕互联的小客服2 小时前
如何解决 Linux 文件系统挂载失败的问题?
linux·服务器·前端·网络·chrome
大聪明-PLUS7 小时前
如何使用 Docker 打包一个简单的应用程序:简易指南
linux·嵌入式·arm·smarc
百***46459 小时前
Java进阶-在Ubuntu上部署SpringBoot应用
java·spring boot·ubuntu
serve the people9 小时前
Prompts for Chat Models in LangChain
java·linux·langchain
李昊哲小课9 小时前
Ubuntu 24.04 MariaDB 完整安装与配置文档
linux·ubuntu·mariadb
人间打气筒(Ada)11 小时前
zerotier内网穿透部署(rockylinux部署本地服务器)超详细~~~
linux·内网穿透·内网·公网·zerotier·穿透