我正在解决安装虚拟包的问题。这是用于演示我的问题的 dockerfile。镜像基于 Debian 10
FROM php:7.4.4-apache-stretch
RUN apt update
RUN apt-get install wget lsb-release -y
RUN apt-get -y install apt-transport-https ca-certificates curl
RUN wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/>
RUN sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) ma>
RUN apt-get update && apt-get install php7.4-cgi -y
我发现php7.4-cgi是虚拟包
root@3004fd5ee36a:/var/www/html# apt search php7.4-cgi
Sorting... Done
Full Text Search... Done
php7.4-cgi/unknown 7.4.4-1+0~20200320.15+debian10~1.gbpf8dc20 amd64
(none)
php7.4-cgi-dbgsym/unknown 7.4.4-1+0~20200320.15+debian10~1.gbpf8dc20 amd64
(none)
root@3004fd5ee36a:/var/www/html# apt show php7.4-cgi
Package: php7.4-cgi
State: not a real package (virtual)
N: Can't select candidate version from package php7.4-cgi as it has no candidate
N: There is 1 additional record. Please use the '-a' switch to see it
N: No packages found
有什么方法可以安装php7.4-cgi吗?
答案1
当您在以下位置搜索您的数据包时德班然后你可以看到,该数据包是用于德班测试。
我建议您升级到靶心,然后就可以正常安装了。