Home » Php » php – configure: error: Please reinstall the libzip distribution

php – configure: error: Please reinstall the libzip distribution

Posted by: admin April 23, 2020 Leave a comment

Questions:

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.

How to&Answers:

Solved it:

apt-get install libzip-dev

will install the missing libzip-distribution

Answer:

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

 yum install php-pecl-zip

This worked for me.

Answer:

This worked for me with Amazon Linux:

yum install libzip-devel.x86_64

Answer:

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

Answer:

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