php 配置:错误:请重新安装 libzip 发行版

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/45775877/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 03:08:42  来源:igfitidea点击:

configure: error: Please reinstall the libzip distribution

phpphp-7pecl

提问by Tobias Gassmann

I am getting this error, when trying to install Zip for PHP 7:

尝试为 PHP 7 安装 Zip 时出现此错误:

pecl install zip

yields the error

产生错误

configure: error: Please reinstall the libzip distribution

配置:错误:请重新安装 libzip 发行版

I did not find anything related to this error.

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

I tried apt-get install libzipbut the package was not found.

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

回答by Tobias Gassmann

Solved it:

解决了

apt-get install libzip-dev

will install the missing libzip-distribution

将安装缺少的 libzip-distribution

回答by Doomd

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

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

 yum install php-pecl-zip

This worked for me.

这对我有用。

回答by Bill Ravdin

This worked for me with Amazon Linux:

这对我来说适用于 Amazon Linux:

yum install libzip-devel.x86_64

回答by Tom

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 libzipand libzip-develon the Psychotic Ninja Plus repositories can be found on those links.

在撰写本文时,我不得不使用 libzip > = 0.11。官方 CentOS x86_64 存储库中的 libzip/libzip-devel 软件包仍在 0.10 上。为了解决这个问题,Psychotic Ninja Plus x86_64 存储库提供了 0.11 版本。信息libziplibzip-devel的对精神病忍者加库可以在这些链接中找到。

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/

从以下位置下载最新的精神病版本 rpm http://packages.psychotic.ninja/7/plus/x86_64/RPMS/

Install psychotic-release rpm:

安装psychotic-release rpm:

rpm -Uvh psychotic-release*rpm

Install libzip-devel rpm package:

安装 libzip-devel rpm 包:

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

回答by pr1nc3

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

由于我花了一些时间和研究来解决这个问题,我认为它对 mac 用户来说可能会派上用场:

You can install libzip through brew using:

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

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

And then:

进而:

brew install libzip