E: 包 'php-xmlrpc' 没有安装候选

E: Package 'php-xmlrpc' has no installation candidate

正在尝试在安装了 php7.3 的图像上安装 php-xmlrpc。

如您所见,我尝试了 apt-get update 但没有用。我也尝试过使用 php7.3-xmlrpc

Docker文件行: RUN apt-get update && apt-get install php-xmlrpc -y

Docker 构建输出:

Step 5/8 : RUN apt-get update && apt-get install php-xmlrpc -y
 ---> Running in 163542fabd8a
Get:1 http://security-cdn.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Get:2 http://security-cdn.debian.org/debian-security buster/updates InRelease [39.1 kB]
Ign:3 http://cdn-fastly.deb.debian.org/debian stretch InRelease
Get:4 http://security-cdn.debian.org/debian-security stretch/updates/main amd64 Packages [500 kB]
Get:5 http://cdn-fastly.deb.debian.org/debian stretch-updates InRelease [91.0 kB]
Hit:6 http://cdn-fastly.deb.debian.org/debian buster InRelease
Get:7 http://security-cdn.debian.org/debian-security buster/updates/main amd64 Packages [112 kB]
Get:8 http://cdn-fastly.deb.debian.org/debian buster-updates InRelease [49.3 kB]
Get:9 http://cdn-fastly.deb.debian.org/debian stretch-updates/main amd64 Packages.diff/Index [12.5 kB]
Get:10 http://cdn-fastly.deb.debian.org/debian stretch-updates/main amd64 Packages 2019-10-27-2015.53.pdiff [398 B]
Get:12 http://cdn-fastly.deb.debian.org/debian stretch-updates/main amd64 Packages 2019-11-06-2017.59.pdiff [903 B]
Get:12 http://cdn-fastly.deb.debian.org/debian stretch-updates/main amd64 Packages 2019-11-06-2017.59.pdiff [903 B]
Hit:11 http://cdn-fastly.deb.debian.org/debian stretch Release
Fetched 900 kB in 1s (634 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Package php-xmlrpc is a virtual package provided by:
  php7.3-xmlrpc 7.3.11-1~deb10u1 [Not candidate version]
  php7.3-xmlrpc 7.3.4-2 [Not candidate version]
  php7.0-xmlrpc 7.0.33-0+deb9u6 [Not candidate version]
  php7.0-xmlrpc 7.0.33-0+deb9u3 [Not candidate version]

E: Package 'php-xmlrpc' has no installation candidate

Docker 文件:

FROM php:7.3-apache

RUN apt-get update -y && apt-get upgrade -y;
RUN apt-get install -y libxml2-dev
RUN docker-php-ext-install -j$(nproc) xmlrpc

有效。

如果你这样构建它:

docker build --tag Whosebug .

然后你可以通过runnig命令检查安装的扩展:

docker run -it --entrypoint="" --rm Whosebug /bin/bash

然后输入控制台

php -m

给出输出:

[PHP Modules]
Core
ctype
curl
date
dom
fileinfo
filter
ftp
hash
iconv
json
libxml
mbstring
mysqlnd
openssl
pcre
PDO
pdo_sqlite
Phar
posix
readline
Reflection
session
SimpleXML
sodium
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
zlib

与:

xmlrpc