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

相关推荐
让子弹飞028 小时前
36.2Linux单总线驱动DS18B20实验(详细讲解代码)_csdn
linux·ubuntu·驱动的分离和分层
朱自清的诗.10 小时前
使用虚拟机Ubuntu搭建mosquito服务器 使esp32、上位机通信
ubuntu·esp32·mosquito
虎头金猫10 小时前
如何在Linux上使用Docker在本地部署开源PDF工具Stirling PDF:StirlingPDF+cpolar让专业操作像在线文档一样简单
linux·运维·ubuntu·docker·pdf·开源·centos
空灵之海12 小时前
Ubuntu系统安全合规配置
linux·ubuntu·系统安全·1024程序员节
笨鸟贤妃15 小时前
Ubuntu 22.04 安装 Docker & Compose 最新最简单完整指南
ubuntu·docker·compose
leo__52015 小时前
在Ubuntu 22.04系统中无需重启设置静态IP地址
tcp/ip·ubuntu·php
对你无可奈何18 小时前
关于Ubuntu的 update造成的内核升级
运维·服务器·ubuntu
夜无霄20 小时前
安卓逆向(一)Ubuntu环境配置
linux·运维·爬虫·ubuntu
抠脚学代码1 天前
Ubuntu Qt x64平台搭建 arm64 编译套件
数据库·qt·ubuntu
Ribou1 天前
Ubuntu 24.04.2安装k8s 1.33.4 配置cilium
linux·ubuntu·kubernetes