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

相关推荐
QMCY_jason1 小时前
ubuntu 24.04 FFmpeg编译 带Nvidia 加速记录
linux·ubuntu·ffmpeg
Fcy6481 小时前
初识Linux和Linux基础指令详细解析及shell的运行原理
linux·服务器·ubuntu·centos
~光~~2 小时前
【环境配置 安装 】RK3588+Ubuntu20.04+cmake3.22+opencv4.54
opencv·ubuntu·rk3588
一只积极向上的小咸鱼1 天前
Windows中通过wsl运行Ubuntu
linux·运维·ubuntu
嵌入式分享1 天前
嵌入式分享#41:RK3576改UART波特率【精简版】
linux·嵌入式硬件·ubuntu·嵌入式
Cyan_RA91 天前
Linux 远程Ubuntu服务器本地部署大模型 EmoLLM 中常见的问题及解决方案 万字详解
linux·运维·服务器·ubuntu·大模型·远程部署·emollm
~光~~2 天前
【环境配置 升级gcc】RK3588 Ubuntu20.04 gcc9升级为gcc10
ubuntu·gcc
你疯了抱抱我2 天前
【SSH】同一局域网下windows使用Xshell SSH连接另一台 ubuntu 22.04 电脑
运维·ubuntu·ssh
2301_818411552 天前
Ubuntu之apt更新源
linux·运维·ubuntu
亮子AI2 天前
【Ubuntu】清理空间的几种方法
linux·运维·ubuntu