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

标签 php linux docker xml-rpc apt-get

尝试在已安装 php7.3 的镜像上安装 php-xmlrpc。

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

Dockerfile 行: 运行 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 stackoverflow .

然后您可以通过运行命令检查已安装的扩展:

docker run -it --entrypoint="" --rm stackoverflow /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

关于php - E : Package 'php-xmlrpc' has no installation candidate,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58750877/

相关文章:

PHP 开源 MySQL 查询生成器?

linux - 使用 bash 为文本文件中的所有列添加双引号

linux - 使用查找但仅在匹配特定模式的子目录中

Docker-swarm >> 无法连接到 docker 引擎端点

docker - Docker容器如何相互访问

shell - 如何从 Docker 容器内禁用和启用互联网连接?

php - 这个分页有什么问题?

php - 从下拉菜单插入到 MySql

php - Silverstripe:在 Widget 安装时导入特定于 Widget 的 CSS

Linux - 环境变量 $HOME 与 $(HOME)