gpt4 book ai didi

php - Docker 镜像 : Unable to locate package php7. 2

转载 作者:行者123 更新时间:2023-12-04 14:33:50 40 4
gpt4 key购买 nike

我有一个 bitbucket 管道设置,它已经完美地工作了一年,但几天前它停止工作了
这是我的 bitbucket 配置的开头

image: atlassian/default-image:2

options:
max-time: 30
pipelines:
default:
- step:
script:
- echo "This script runs on all branches that don't have any specific pipeline assigned in 'branches'."
branches:
master:
- step:
caches:
- composer
name: cms
deployment: production
script:
- apt-get update
- apt-get install -y software-properties-common python-software-properties
- add-apt-repository -y ppa:ondrej/php
- apt-get update
- apt-get install -y php7.2 php7.2-cli php7.2-common php7.2-mbstring
- apt-get install -y php7.2-curl php7.2-xml
...
...
现在我不断收到以下错误(以前没有发生过):
+ apt-get install -y php7.2 php7.2-cli php7.2-common php7.2-mbstring
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package php7.2
E: Couldn't find any package by regex 'php7.2'
E: Unable to locate package php7.2-cli
E: Couldn't find any package by regex 'php7.2-cli'
E: Unable to locate package php7.2-common
E: Couldn't find any package by regex 'php7.2-common'
E: Unable to locate package php7.2-mbstring
E: Couldn't find any package by regex 'php7.2-mbstring'
我在 docker 镜像端找不到任何更改,而且 ondrej 的 repo 似乎仍然包含这些包。可能是什么问题呢?

最佳答案

atlassian/default-image:2基于 ubuntu16.04(xenial),但它的生命周期是 2021 年 4 月。
来自 ppa:ondrej/php我们接下来可以看到的主页:

Don't ask for end-of-life PHP versions or Ubuntu release, they won't be provided.


这意味着楼主已经取消了对ubuntu16.04的支持,这就是你无法在ubuntu16.04上安装php7.2的原因。
对于你,去 PPA 找到另一个 php7.2 ppa,例如 ppa:jason.grammenos.agility/php ,那么接下来可以解决您的问题:
$ add-apt-repository -y ppa:jason.grammenos.agility/php
$ apt-get update
$ apt-cache policy php7.2
php7.2:
Installed: (none)
Candidate: 7.2.15-1+ubuntu16.04.1+deb.sury.org+1
Version table:
7.2.15-1+ubuntu16.04.1+deb.sury.org+1 500
500 http://ppa.launchpad.net/jason.grammenos.agility/php/ubuntu xenial/main amd64 Packages
$ apt-get install -y php7.2

关于php - Docker 镜像 : Unable to locate package php7. 2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68010627/

40 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com