Debian镜像更换腾讯云镜像源及解决"does not have a Release file"问题

老乐 运维文档10字数 2544阅读8分28秒阅读模式

这里有一台国内的云服务器重新部署Web环境,但是默认的是Debian官方源,安装软件的时候比较慢。这里我考虑将更换成国内镜像源。比如我们常用的源镜像包括腾讯云、阿里云、华为云登。这里我直接按照惯例将Debian的源更换。

修改配置:

/etc/apt/sources.list

我将里面的文件替换:

deb https://mirrors.cloud.tencent.com/debian/ buster main contrib non-free
deb https://mirrors.cloud.tencent.com/debian/ buster-updates main contrib non-free
deb https://mirrors.cloud.tencent.com/debian/ buster-backports main contrib non-free
deb https://mirrors.cloud.tencent.com/debian-security buster/updates main contrib non-free
deb-src https://mirrors.cloud.tencent.com/debian/ buster main contrib non-free
deb-src https://mirrors.cloud.tencent.com/debian/ buster-updates main contrib non-free
deb-src https://mirrors.cloud.tencent.com/debian/ buster-backports main contrib non-free
deb-src https://mirrors.cloud.tencent.com/debian-security buster/updates main contrib non-free

替换完毕之后,执行命令。

apt update -y

不过在执行后有错误提示。

Debian镜像更换腾讯云镜像源及解决"does not have a Release file"问题

我开始以为是腾讯云源的问题,于是我更换成阿里云和华为云的Debian源也是如此。

华为云Debian源:

deb https://mirrors.huaweicloud.com/debian/ buster main contrib non-free
deb https://mirrors.huaweicloud.com/debian/ buster-updates main contrib non-free
deb https://mirrors.huaweicloud.com/debian/ buster-backports main contrib non-free
deb https://mirrors.huaweicloud.com/debian-security/ buster/updates main contrib non-free
deb-src https://mirrors.huaweicloud.com/debian/ buster main contrib non-free
deb-src https://mirrors.huaweicloud.com/debian/ buster-updates main contrib non-free
deb-src https://mirrors.huaweicloud.com/debian/ buster-backports main contrib non-free

阿里云Debian源:

deb http://mirrors.aliyun.com/debian/ buster main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib
deb http://mirrors.aliyun.com/debian-security buster/updates main
deb-src http://mirrors.aliyun.com/debian-security buster/updates main
deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib

然后执行后依旧有问题。

E: The repository 'https://***/debian buster-backports Release' does not have 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.

都会看到这个错误,看来问题是一样的,换源不能解决问题。

其实较多的问题都集中在buster-backports文件上,是不是这个源URL有问题,那我们将这个源更换成Debian源,其他不变是不是就可以解决。

将有"buster-backports main contrib non-free"的行的内容换成Debian源的。

deb http://archive.debian.org/debian buster-backports main contrib non-free
deb-src http://archive.debian.org/debian buster-backports main contrib non-free

然后我们再执行 :

apt update && apt upgrade

问题是可以得到解决的。

投上你的一票
 
  • 本文由 老乐 发表于 2024年5月9日 09:19:46
  • 转载请务必保留本文链接:https://www.zhujipingjia.com/does-not-have-a-release-file.html
  • Debian更换国内源
  • Debian更换腾讯云