sudo apt update

如果出现 更新不了,因为apt跟新不了,后面安装install软件就会报错

-virtual-machine:~$ sudo apt update
Get:1 http://deb.debian.org/debian noble-backports InRelease [2,578 B]
Err:1 http://deb.debian.org/debian noble-backports InRelease
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Hit:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu noble InRelease
Hit:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates InRelease
Hit:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-backports InRelease
Hit:5 https://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-security InRelease
Reading package lists... Done
E: Failed to fetch http://deb.debian.org/debian/dists/noble-backports/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
E: The repository 'http://deb.debian.org/debian noble-backports InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
或者
sudo apt update
Get:1 http://deb.debian.org/debian noble-backports InRelease [2,578 B]
Err:1 http://deb.debian.org/debian noble-backports InRelease                   
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Hit:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu noble InRelease              
Hit:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates InRelease
Hit:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-backports InRelease
Hit:5 https://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-security InRelease
Reading package lists... Done
E: Failed to fetch http://deb.debian.org/debian/dists/noble-backports/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
E: The repository 'http://deb.debian.org/debian noble-backports InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/ubuntu.sources:1
 

解决方法:删掉配置文件,重新生成
 

sudo rm -f /etc/apt/sources.list.d/*.list
-virtual-machine:~$ sudo rm -f /etc/apt/sources.list.d/*.sources
-virtual-machine:~$ cat <<EOF | sudo tee /etc/apt/sources.list
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-security main restricted universe multiverse
EOF
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-security main restricted universe multiverse

-virtual-machine:~$ sudo apt update
Hit:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu noble InRelease
Hit:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates InRelease
Hit:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-backports InRelease
Hit:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-security InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
simon@simon-virtual-machine:~$ 


 

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值