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

相关推荐
Moshow郑锴4 小时前
Ubuntu 26.04 中文输入法 : fcitx5+Rime中州韵引擎
linux·运维·ubuntu
Moshow郑锴8 小时前
Ubuntu 26.04 更换阿里云源镜像
linux·运维·ubuntu
梦想的颜色12 小时前
从零入门:Docker在Ubuntu上的安装、使用与主流镜像仓库实战(Java/Go/MySQL/PostgreSQL/MongoDB/Nginx
java·ubuntu·docker
行智科技13 小时前
FAST-LIVO2 源码精读(二):环境搭建与编译避坑
算法·ubuntu·自动驾驶·slam
Qres82114 小时前
docker & WSL & Ubuntu安装记录
ubuntu·docker·容器·wsl
祭曦念17 小时前
【共创季稿事节】鸿蒙原生 ArkTS 布局:NavRouter + NavDestination 导航布局实战
ubuntu·华为·harmonyos
黑白园17 小时前
【环境搭建】虚拟机及Ubuntu安装所需的电脑硬件资源
linux·ubuntu
syc78901231 天前
中文语境下AI编码工具实战对比:从迭代体验看日常开发选择
linux·人工智能·ubuntu
vsropy1 天前
Ubuntu网络图标消失问题/有网络问号
linux·运维·ubuntu
coderwu1 天前
Ubuntu 24.04 终端输入 openclaw config 提示未找到命令解决办法
linux·运维·ubuntu