{"id":1700,"date":"2023-03-25T21:58:27","date_gmt":"2023-03-25T13:58:27","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1700"},"modified":"2023-04-23T21:55:29","modified_gmt":"2023-04-23T13:55:29","slug":"compiling-php-7-4-under-centos-error-package-requirements-libzip-were-not-met","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/25\/compiling-php-7-4-under-centos-error-package-requirements-libzip-were-not-met\/","title":{"rendered":"CentOS\u4e0b\u7f16\u8bd1PHP 7.4\u62a5\u9519Package requirements (libzip >= 0.11 libzip != 1.3.1 libzip != 1.7.0) were not met"},"content":{"rendered":"<h2>\u9519\u8bef\u5206\u6790<\/h2>\n<p>\u9519\u8bef\u65e5\u5fd7\uff1a<\/p>\n<pre><code>checking for zip archive read\/write support... yes\nchecking for libzip &gt;= 0.11 libzip != 1.3.1 libzip != 1.7.0... no\nconfigure: error: Package requirements (libzip &gt;= 0.11 libzip != 1.3.1 libzip != 1.7.0) were not met:\n\nNo package &#039;libzip&#039; found\nNo package &#039;libzip&#039; found\nNo package &#039;libzip&#039; found\n\nConsider adjusting the PKG_CONFIG_PATH environment variable if you\ninstalled software in a non-standard prefix.\n\nAlternatively, you may set the environment variables LIBZIP_CFLAGS\nand LIBZIP_LIBS to avoid the need to call pkg-config.\nSee the pkg-config man page for more details.<\/code><\/pre>\n<p><!-- more --><\/p>\n<p>\u539f\u56e0\u5206\u6790\uff1aCentOS 7\u4e0a\u81ea\u5e26\u6216\u901a\u8fc7yum\u5b89\u88c5\u7684libzip\u7248\u672c\u8fc7\u4f4e<\/p>\n<h2>\u89e3\u51b3\u65b9\u6cd5<\/h2>\n<p>\uff081\uff09\u67e5\u770b\u662f\u5426\u6709\u5b89\u88c5\u8fc7libzip<\/p>\n<pre><code class=\"language-bash\">rpm -q libzip\nrpm -q libzip-devel<\/code><\/pre>\n<p>\u5982\u679c\u6709\uff0c\u5378\u8f7d\u5b83<\/p>\n<pre><code class=\"language-bash\">yum remove libzip-devel libzip<\/code><\/pre>\n<p>\uff082\uff09\u7136\u540e\u4ece\u5b98\u7f51\u4e0b\u8f7d\u5e76\u7f16\u8bd1\u5b89\u88c5<\/p>\n<pre><code class=\"language-bash\">wget https:\/\/libzip.org\/download\/libzip-1.3.2.tar.gz\ntar zxf libzip-1.3.2.tar.gz\ncd libzip-1.3.2\n.\/configure\nmake &amp;&amp; make install<\/code><\/pre>\n<p>\u5982\u679c\u662f\u4e0b\u8f7d1.5.*\u4ee5\u4e0a\u7248\u672c\uff0c\u5219\u9700\u8981\u91c7\u7528\u5982\u4e0b\u5b89\u88c5\u65b9\u5f0f<\/p>\n<pre><code class=\"language-bash\">yum -y install cmake\nwget https:\/\/libzip.org\/download\/libzip-1.5.2.tar.gz\ntar zxf libzip-1.5.2.tar.gz\ncd libzip-1.5.2\nmkdir build\ncd build\ncmake ..\nmake &amp;&amp; make install<\/code><\/pre>\n<p>\uff083\uff09\u67e5\u770blibzip\u5b89\u88c5\u4f4d\u7f6e<\/p>\n<pre><code class=\"language-bash\"># whereis libzip\nlibzip: \/usr\/local\/lib\/libzip.la \/usr\/local\/lib\/libzip.a \/usr\/local\/lib\/libzip.so<\/code><\/pre>\n<p>\uff084\uff09\u52a8\u6001\u94fe\u63a5\u5e93\u6dfb\u52a0\u4e3a\u7cfb\u7edf\u5171\u4eab<\/p>\n<pre><code class=\"language-bash\"># echo &quot;\/usr\/local\/lib&quot; &gt;&gt;\/etc\/ld.so.conf\n# ldconfig -v | grep libzip\n# export PKG_CONFIG_PATH=\/usr\/local\/lib\/pkgconfig\/:$PKG_CONFIG_PATH<\/code><\/pre>\n<p>\uff085\uff09\u4e5f\u53ef\u4ee5\u5b89\u88c5rpm\u5305<\/p>\n<pre><code class=\"language-bash\">yum remove libzip libzip-devel\nyum install https:\/\/rpms.remirepo.net\/enterprise\/7\/remi\/x86_64\/libzip5-1.7.0-1.el7.remi.x86_64.rpm\nyum install https:\/\/rpms.remirepo.net\/enterprise\/7\/remi\/x86_64\/libzip5-devel-1.7.0-1.el7.remi.x86_64.rpm<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u9519\u8bef\u5206\u6790 \u9519\u8bef\u65e5\u5fd7\uff1a checking for zip archive read\/write support. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[364],"class_list":["post-1700","post","type-post","status-publish","format-standard","hentry","category-devops-base","tag-libzip"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1700","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1700"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1700\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1700"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1700"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1700"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}