configure: error: Please reinstall the libzip distribution

PhpPhp 7Pecl

Php 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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionTobias GassmannView Question on Stackoverflow
Solution 1 - PhpTobias GassmannView Answer on Stackoverflow
Solution 2 - PhpDoomdView Answer on Stackoverflow
Solution 3 - PhpBill RavdinView Answer on Stackoverflow
Solution 4 - PhpTomView Answer on Stackoverflow
Solution 5 - Phppr1nc3View Answer on Stackoverflow