configure: error: Please reinstall the libzip distribution

configure: error: Please reinstall the libzip distribution

我在尝试为 PHP 7:

安装 Zip 时遇到此错误
pecl install zip

产生错误

configure: error: Please reinstall the libzip distribution

我没有找到与此错误相关的任何内容。

我试过了apt-get install libzip但是找不到包裹。

解决了:

apt-get install libzip-dev

将安装缺少的 libzip-distribution

这可能对 webmin/virtualmin 用户有帮助 运行 CentOS 7:

 yum install php-pecl-zip

这对我有用。

这对我在亚马逊上有用 Linux:

yum install libzip-devel.x86_64

在撰写本文时,我不得不使用 libzip > = 0.11。官方上的libzip/libzip-devel包 CentOS x86_64 存储库仍在 0.10 上。为了解决这个问题,Psychotic Ninja Plus x86_64 存储库提供了 0.11 版本。可以在这些链接上找到关于 Psychotic Ninja Plus 存储库的 libzip and libzip-devel 信息。

要安装和使用此版本,您可以运行以下命令,

从以下位置下载最新的 psychotic-release rpm http://packages.psychotic.ninja/7/plus/x86_64/RPMS/

安装 psychotic-release rpm:

rpm -Uvh psychotic-release*rpm

安装 libzip-devel rpm 包:

yum --enablerepo=psychotic-plus install libzip-devel

由于我花了一些时间和研究来解决这个问题,我认为它可能对 mac-users:

派上用场

您可以使用以下命令通过 brew 安装 libzip:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null

然后:

brew install libzip