docker - 在 ubuntu 16.04 上安装 php7.4 - Dockerfile

标签 docker ubuntu-16.04 php-7

我正在尝试使用以下命令安装 php7.4 和相关包

FROM ubuntu:16.04
RUN apt update \
    && apt install -y software-properties-common\
    && add-apt-repository ppa:ondrej/php \
    && apt-get update \
    && apt-get install -y php7.4

我收到以下消息

Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package php7.4
E: Couldn't find any package by glob 'php7.4'
E: Couldn't find any package by regex 'php7.4'

关于搜索

apt-cache search php7

我看到只有7.0相关的包可用

php7.0 - server-side, HTML-embedded scripting language (metapackage)
php7.0-cgi - server-side, HTML-embedded scripting language (CGI binary)
php7.0-cli - command-line interpreter for the PHP scripting language
php7.0-common - documentation, examples and common module for PHP
php7.0-curl - CURL module for PHP

我很困惑为什么我没有得到更新的版本,因为 7.3、7、4 和 8 应该是今天唯一可用的版本。如何获取 php7.4 包?

最佳答案

TL;DR:自 Ubuntu 16.04 达到“标准支持终止”以来,它的软件包已从 PPA 中删除。


您可能想阅读以下内容:https://github.com/oerdnj/deb.sury.org/issues/1567

In April 2021, Ubuntu 16.04 Xenial will reach End of Standard Support and will be available only as a paid option through Ubuntu Extended Security Maintenance.

What does it mean for DEB.SURY.ORG PPAs?

  • The packages for Ubuntu 16.04 will be deleted shortly after the EoL/EoSS is announced, usually at the same time as the next PHP release is published because it's not possible to build the packages any more.

  • The packages for Ubuntu 16.04 will be available via PHP LTS by Freexian paid program. This is cheaper option than previously announced Private dedicated repositories.

关于docker - 在 ubuntu 16.04 上安装 php7.4 - Dockerfile,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68175292/

相关文章:

symfony - 有人知道 Symfony 3 构建应用程序的双因素身份验证 API 吗?

PHP Artisan Tinker 不适用于 Laravel 5.4 和 PHP 7.0.1

c# - 从 docker 容器连接到 SQL Server 数据库

docker - 没有安装组文件-CentOS 7-组安装

git - 差异:选项无法识别 «--git»

python - 启动具有特定 IP 的 ROS 节点

r - VSTS 中的 SSH 任务显示错误,即使它只是日志

php - 如何使用空合并运算符将语句附加到字符串?

r - 如何提高在 Windows 10 上运行 R 脚本的基于 Linux 的 Docker 桌面容器的性能?

docker 中 rabbitmq 的 Spring Boot 应用程序问题