如何在带有CentOS 7的PHP 7.2上安装zipArchive? [英] How can I install zipArchive on PHP 7.2 with CentOS 7?

查看:791
本文介绍了如何在带有CentOS 7的PHP 7.2上安装zipArchive?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在具有最新WordPress的Nginx Web服务器上安装ziparchive和domdocument.为了运行Avada主题,我需要在本地CentOS 7测试服务器上使用这两个主题.我正在寻找过去3天的答案.我该怎么办?

I am trying to install ziparchive and domdocument on nginx web server that has the latest WordPress. In order to run Avada theme, I need these two on the local CentOS 7 test server. I am searching for an answer for the past 3 days. What shoud I do?

以下是已安装的yum列表"的部分列表:

Here is a partial list of "yum list installed:"

php-common.x86_64                   7.2.3-2.el7.remi               @remi-php72<BR>
php-fpm.x86_64                      7.2.3-2.el7.remi               @remi-php72<BR>
php-json.x86_64                     7.2.3-2.el7.remi               @remi-php72<BR>
php-mysqlnd.x86_64                  7.2.3-2.el7.remi               @remi-php72<BR>
php-pdo.x86_64                      7.2.3-2.el7.remi               @remi-php72<BR>
php72.x86_64                        1.0-1.el7.remi                 @remi-safe<BR>
php72-php-cli.x86_64                7.2.3-2.el7.remi               @remi-safe<BR>
php72-php-common.x86_64             7.2.3-2.el7.remi               @remi-safe<BR>
php72-php-json.x86_64               7.2.3-2.el7.remi               @remi-safe<BR>
php72-php-mbstring.x86_64           7.2.3-2.el7.remi               @remi-safe<BR>
php72-php-pear.noarch               1:1.10.5-6.el7.remi            @remi-safe<BR>
php72-php-process.x86_64            7.2.3-2.el7.remi               @remi-safe<BR>
php72-php-xml.x86_64                7.2.3-2.el7.remi               @remi-safe<BR>
php72-runtime.x86_64                1.0-1.el7.remi                 @remi-safe<BR>

unzip.x86_64                        6.0-16.el7                     @base<BR>

推荐答案

php-json.x86_64 7.2.3-2.el7.remi @ remi-php72

php-json.x86_64 7.2.3-2.el7.remi @remi-php72

php72-php-json.x86_64 7.2.3-2.el7.remi @ remi-safe

php72-php-json.x86_64 7.2.3-2.el7.remi @remi-safe

看起来您的安装很乱,您已经安装了一半的 php- 软件包(基本软件包)和一半的 php72-php- (SCL程序包)

Looks like your installation is a mess, you have installed half of the php- packages (base packages) and half of the php72-php- (SCL packages)

阅读有关 PHP- *和php ##-php- *软件包之间的区别的常见问题解答. ?

php-fpm.x86_64 7.2.3-2.el7.remi @ remi-php72

php-fpm.x86_64 7.2.3-2.el7.remi @remi-php72

当您使用FPM作为 remi-php72 的基本软件包时,您需要来自同一存储库的zip扩展名(可能未启用,请使用yum repolist进行检查)

As you are using FPM as base package from remi-php72, you need zip extension from the same repository (which is probably not enabled, chech with yum repolist)

丢弃不需要的包

yum remove php72\*

向导所述,永久启用存储库以确保所有扩展将被拉走

As explained by the wizard, enable the repository permanently to ensure all extensions will be pulled from it

yum-config-manager --enable remi-php72
yum install php-pecl-zip

echo"extension = zip.so" >>/etc/php.d/zip.in

echo "extension=zip.so" >> /etc/php.d/zip.in

从不执行此操作,每个程序包都提供其配置文件以启用提供的扩展名.

Never do this, each package provides its configuration file to enable the provided extension.

这篇关于如何在带有CentOS 7的PHP 7.2上安装zipArchive?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆