ubuntu php libzip安装 ./configure报错 checking for libzip... not found configure

7 篇文章 0 订阅

借鉴:
https://blog.csdn.net/qq_39034363/article/details/90547741
https://www.cnblogs.com/Julian-Chen/p/9449360.html

本文教大家ubuntu系统安装php的扩展 libzip

正文

我在执行

./configure

最后的报错信息

checking for libzip... not found
configure: error: Please reinstall the libzip distribution

解决:
去官网下载找最新版本上传服务器在这里插入图片描述

我这里直接复制链接地址,然后下载到服务器上
在这里插入图片描述

wget https://libzip.org/download/libzip-1.8.0.tar.gz

下载好之后

tar -zxvf libzip*.gz

进入目录

这时执行
./configure
是会失败的

需要找一个config.m4文件 到需要编译的目录
在这里插入图片描述
然后执行phpize
在这里插入图片描述
然后

cd build
cmake ..

如果提示,就更新
借鉴:https://blog.csdn.net/banyu0052/article/details/101946336
我这里直接用apt安装了

apt-get install cmake -y

如果报错

  /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.10/Modules/FindZLIB.cmake:112 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:174 (FIND_PACKAGE)

解决

apt-get install libhdf5-serial-dev hdf5-tools

继续

make && make install

至此 教程结束

有问题可以私信我,每天都会看

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
编写php服务的dockerfile文档,满足如下要求: 1)基础镜像:centos:7 2)作者信息:姓名首字母 3)下载gcc gcc-c++ gd-devel libxml2-devel libcurl-devel libjpeg-devel libpng-devel openssl-devel make perl 4)将本地文件libzip-1.2.0.tar.gz解压并复制到容器中的/tmp中 5)通过以下命令对libzip进行配置编译: cd /tmp/libzip-1.2.0 && ./configure && make && make install 6)在容器中复制并解压文件php-7.3.9.tar.gz到/tmp文件夹中,然后进入到/tmp/php-7.3.9文件夹下,并通过以下命令进行编译: ./configure --prefix=/usr/local/php \ --with-config-file-path=/usr/local/php/etc \ --with-mysql --with-mysqli \ --with-openssl --with-zlib --with-curl --with-gd \ --with-jpeg-dir --with-png-dir --with-iconv \ --enable-fpm --enable-zip --enable-mbstring 6)在容器中将/usr/local/lib/libzip/include/zipconf.h文件复制到 /usr/local/include/文件加下 7)继续进行编译make -j 4 && make install 8)在容器中将/usr/local/php/etc/php-fpm.conf.default文件复制为 /usr/local/php/etc/php-fpm.conf文件 9)在容器中将文件/usr/local/php/etc/php-fpm.d/www.conf.default 复制成/usr/local/php/etc/php-fpm.d/www.conf 文件 10)在容器中修改/usr/local/php/etc/php-fpm.d/www.conf文件中的127.0.0.1为0.0.0.0 11)在容器中复制./sapi/fpm/init.d.php-fpm文件成 /etc/init.d/php-fpm文件 12)在容器中修改/etc/init.d/php-fpm权限为可执行 13)端口9000 14)在容器启动时执行命令:/etc/init.d/php-fpm start && tail -F /var/log/messages
06-09

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

石宗昊

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值