docker安装PHP5.6 提示 does not have a Release file

一、运行docker-compose up -d,提示does not have a Release file   

603.1 Reading package lists...
603.1 W: The repository 'http://mirrors.163.com/debian stretch Release' does not have a Release file.
603.1 W: The repository 'http://mirrors.163.com/debian stretch-updates Release' does not have a Release file.
603.1 W: The repository 'http://mirrors.163.com/debian stretch-backports Release' does not have a Release file.
603.1 W: The repository 'http://mirrors.163.com/debian-security stretch/updates Release' does not have a Release file.
603.1 E: Failed to fetch http://mirrors.163.com/debian/dists/stretch/main/source/Sources  404  Not Found
603.1 E: Failed to fetch http://mirrors.163.com/debian/dists/stretch-updates/main/source/Sources  404  Not Found
603.1 E: Failed to fetch http://mirrors.163.com/debian/dists/stretch-backports/contrib/source/Sources  404  Not Found
603.1 E: Failed to fetch http://mirrors.163.com/debian-security/dists/stretch/updates/main/source/Sources  404  Not Found
603.1 E: Some index files failed to download. They have been ignored

1、原因

这个镜像地址所在的目录中找不到相应的资源,因此需要更换源。

2、更换源地址

/etc/apt/sources.list

使用如下源

deb http://archive.debian.org/debian/ stretch main non-free contrib
deb-src http://archive.debian.org/debian/ stretch main non-free contrib
deb http://archive.debian.org/debian-security/ stretch/updates main non-free contrib
deb-src http://archive.debian.org/debian-security/ stretch/updates main non-free contrib
deb http://archive.debian.org/debian/ stretch-backports main non-free contrib
deb-src http://archive.debian.org/debian/ stretch-backports main non-free contrib

3、继续执行docker-compose

发现有失败了。

二、更新过程中遇到NO_PUBKEY的问题

78.35 W: GPG error: http://archive.debian.org/debian stretch-backports InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9
78.35 W: The repository 'http://archive.debian.org/debian stretch-backports InRelease' is not signed.

1、将出现的NO_PUBKEY添加到dockerfile文件中

RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9

继续执行1-3,如果你幸运,就成功了。

三、如果和我一样不幸,出现gnupg, gnupg2 没有安装的错误

0.215 E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation

1、需要添加安装pnupg代码

RUN apt-get update && apt-get install -y gnupg2 

继续执行1-3,就成功了

大功告成

祝好运

  • 7
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值