0

我正在使用官方的 php:7.1-apache docker 镜像。我想安装一堆模块,比如xdebug。但是,我不能。我使用 apt-get 但我得到了回应:E: Unable to locate package php7.0-xdebug

我错过了什么?为什么通过 apt-get 向这个官方基础镜像添加任何 php7 附加组件几乎是不可能的?有没有更好的办法?

4

1 回答 1

0

正确的包是php-xdebug

RUN apt-get update -y && apt-get install -y php-xdebug

确保在正确安装 php 后运行它。

如果您仍然收到错误 apt-get 需要了解 debian 存储库。在安装 xdebug 之前添加这个谎言:

RUN  echo "deb  http://deb.debian.org/debian  stretch main" >> /etc/apt/sources.list
RUN  echo "deb-src  http://deb.debian.org/debian  stretch main" >> /etc/apt/sources.list
于 2017-10-05T16:51:05.760 回答