configure: error: Please reinstall the libzip distribution
PhpPhp 7PeclPhp Problem Overview
I am getting this error, when trying to install Zip for PHP 7:
pecl install zip
yields the error
> configure: error: Please reinstall the libzip distribution
I did not find anything related to this error.
I tried apt-get install libzip
but the package was not found.
Php Solutions
Solution 1 - Php
Solved it:
apt-get install libzip-dev
will install the missing libzip-distribution
Solution 2 - Php
This might be helpful for webmin/virtualmin users running CentOS 7:
yum install php-pecl-zip
This worked for me.
Solution 3 - Php
This worked for me with Amazon Linux:
yum install libzip-devel.x86_64
Solution 4 - Php
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
Solution 5 - Php
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