Configure: error: 请重新安装 libzip 发行版

我在试图安装 PHP 7的 Zip 时遇到了这个错误:

pecl install zip

就会产生错误

Configure: error: 请重新安装 libzip 发行版

我没有找到任何与这个错误相关的东西。

我试过 apt-get install libzip,但是没有找到包裹。

89457 次浏览

Solved it:

apt-get install libzip-dev

will install the missing libzip-distribution

This might be helpful for webmin/virtualmin users running CentOS 7:

 yum install php-pecl-zip

This worked for me.

This worked for me with Amazon Linux:

yum install libzip-devel.x86_64

At the time of this writing, I had to use libzip > = 0.11. The libzip/libzip-devel package on the official CentOS x86_64 repository is still on 0.10. To get around this, the Psychotic Ninja Plus x86_64 repository offers a 0.11 version. Information for libzip and libzip-devel on the Psychotic Ninja Plus repositories can be found on those links.

To install and use this version, you can run the following commands,

Download latest psychotic-release rpm from http://packages.psychotic.ninja/7/plus/x86_64/RPMS/

Install psychotic-release rpm:

rpm -Uvh psychotic-release*rpm

Install libzip-devel rpm package:

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

Since it took me some time and research to figure this out i think it may come handy for mac-users:

You can install libzip through brew using:

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

And then:

brew install libzip