当前位置:论坛首页 > Linux面板 > 求助

【待反馈】宝塔8.1版本安装PHP扩展出错

发表在 Linux面板2024-5-6 07:48 [复制链接] 1 2164

为了能快速了解并处理您的问题,请提供以下基础信息:
面板、插件版本:8.1

系统版本:ubuntu20

问题描述:无法安装PHP8.0扩展fileinfo

相关截图(日志、错误):
  1. /bin/sh /www/server/php/80/src/ext/fileinfo/libtool --mode=compile cc -I. -I/www/server/php/80/src/ext/fileinfo -I/www/server/php/80/src/ext/fileinfo/include -I/www/server/php/80/src/ext/fileinfo/main -I/www/server/php/80/src/ext/fileinfo -I/www/server/php/80/include/php -I/www/server/php/80/include/php/main -I/www/server/php/80/include/php/TSRM -I/www/server/php/80/include/php/Zend -I/www/server/php/80/include/php/ext -I/www/server/php/80/include/php/ext/date/lib -DHAVE_CONFIG_H -std=c99 -g -O2 -I/www/server/php/80/src/ext/fileinfo/libmagic -c /www/server/php/80/src/ext/fileinfo/fileinfo.c -o fileinfo.lo
  2. mkdir .libs
  3. cc -I. -I/www/server/php/80/src/ext/fileinfo -I/www/server/php/80/src/ext/fileinfo/include -I/www/server/php/80/src/ext/fileinfo/main -I/www/server/php/80/src/ext/fileinfo -I/www/server/php/80/include/php -I/www/server/php/80/include/php/main -I/www/server/php/80/include/php/TSRM -I/www/server/php/80/include/php/Zend -I/www/server/php/80/include/php/ext -I/www/server/php/80/include/php/ext/date/lib -DHAVE_CONFIG_H -std=c99 -g -O2 -I/www/server/php/80/src/ext/fileinfo/libmagic -c /www/server/php/80/src/ext/fileinfo/fileinfo.c -fPIC -DPIC -o .libs/fileinfo.o
  4. /www/server/php/80/src/ext/fileinfo/fileinfo.c:20:10: fatal error: php.h: No such file or directory
  5. 20 | #include "php.h"
  6. | ^~~~~~~
  7. compilation terminated.
  8. make: *** [Makefile:209: fileinfo.lo] Error 1
  9. error
  10. |-Successify --- 命令已执行! ---

复制代码

使用道具 举报 只看该作者 回复
发表于 2024-5-6 09:46:02 | 显示全部楼层
您好,执行下面命令安装一依赖之后,再去安装fileinfo拓展试试
apt-get install php7.4-dev
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

紧急运维服务

响应时间:3分钟

问题处理方式:宝塔专家1对1服务

工作时间:工作日:9:00 - 18:30

宝塔专业团队为您解决服务器疑难问题

点击联系技术分析

工作时间:09:00至18:30

快速回复 返回顶部 返回列表