ubuntu 换源

sudo apt update

错误如下

复制代码
Ign:1 http://security.ubuntu.com/ubuntu focal-security InRelease
Ign:2 http://us.archive.ubuntu.com/ubuntu focal InRelease          
Err:3 http://security.ubuntu.com/ubuntu focal-security Release     
  SECURITY: URL redirect target contains control characters, rejecting. [IP: 91.189.91.81 80]
Ign:4 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease  
Ign:5 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease
Err:6 http://us.archive.ubuntu.com/ubuntu focal Release
  SECURITY: URL redirect target contains control characters, rejecting. [IP: 91.189.91.81 80]
Err:7 http://us.archive.ubuntu.com/ubuntu focal-updates Release
  SECURITY: URL redirect target contains control characters, rejecting. [IP: 91.189.91.83 80]
Err:8 http://us.archive.ubuntu.com/ubuntu focal-backports Release
  SECURITY: URL redirect target contains control characters, rejecting. [IP: 91.189.91.83 80]
Reading package lists... Done
E: The repository 'http://security.ubuntu.com/ubuntu focal-security Release' no longer has a Release file.
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.
E: The repository 'http://us.archive.ubuntu.com/ubuntu focal Release' no longer has a Release file.
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.
E: The repository 'http://us.archive.ubuntu.com/ubuntu focal-updates Release' no longer has a Release file.
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.
E: The repository 'http://us.archive.ubuntu.com/ubuntu focal-backports Release' no longer has a Release file.
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.

--- > 换源后解决

换源方法如后面。

就换源就解决了,很简单

1,更换网络,改用手机连接

2,更换https软件软件源,比如清华的。

打开链接:https://mirror.tuna.tsinghua.edu.cn/help/ubuntu/

选择合适的ubuntu版本,更新仓库配置文件/etc/apt/sources.list。

mv /etc/apt/sources.list /etc/apt/sources.list_bak

vim /etc/apt/sources.list

refer https://blog.csdn.net/shangyexin/article/details/102657776

相关推荐
永恒-龙啸5 小时前
Ubuntu编译自定义immortalwrt固件与软件编译
运维·ubuntu·开源软件·immortalwrt
starvapour5 小时前
Ubuntu触发硬件级系统重启
linux·运维·ubuntu
咋吃都不胖lyh5 小时前
CUDA、Ubuntu、显卡驱动:零基础讲清(附三者关联)
linux·运维·ubuntu
石像鬼₧魂石6 小时前
Fail2Ban核心架构学习
linux·学习·ubuntu
老兵发新帖7 小时前
ubuntu网络管理功能分析
数据库·ubuntu·php
@Wufan7 小时前
ubuntu服务器子用户(无sudo权限)安装/切换多个版本cuda
linux·服务器·ubuntu·cuda
尐葮阿譽10 小时前
Ubuntu 25.10 安装 Waydroid 安卓模拟器
android·ubuntu·安卓模拟器·waydroid
石像鬼₧魂石11 小时前
Fail2Ban 一键部署 + 管理脚本(可直接执行)
linux·windows·学习·ubuntu
石像鬼₧魂石11 小时前
Fail2Ban 实战终极速查表
linux·windows·学习·ubuntu
熊文豪12 小时前
Ubuntu 安装 Oracle 11g XE 完整指南
linux·ubuntu·oracle