Ubuntu 26.04系统下宝塔控制面板安装PHP7.4失败的说明

[重要通告]如您遇疑难杂症,本站支持知识付费业务,扫右边二维码加博主微信,可节省您宝贵时间哦!

Ubuntu系统更新到了26.04版本,前几天安装了Ubuntu26.04 (Resolute Raccoon) x86_64(Py3.7.16)版本,然而安装PHP7.4竟然失败,错误如下所示

Ubuntu 26.04系统下宝塔控制面板安装PHP7.4失败的说明

去宝塔论坛看了一下,出现这个错误的不光一人,有很多人都有这个问题,都是安装PHP7.4的时候提示安装失败,多次尝试均按照失败,尝试过编译安装和极速安装;

主要还是兼容问题造成的,毕竟PHP7.4PHP官方已经停止维护,Ubuntu26是今年5月份推出的新系统,如非要使用PHP7.4建议降级系统到Ubuntu24版本;

安装PHP7.4出现的错误如下所示

/www/server/php/74/src/ext/libxml/libxml.c: In function ‘_php_libxml_external_entity_loader’:
/www/server/php/74/src/ext/libxml/libxml.c:711:41: warning: ‘context’ is deprecated [-Wdeprecated-declarations]
711 | pib->context = stream;
| ^~~
/usr/include/libxml2/libxml/xmlIO.h:127:28: note: declared here
127 | void* context XML_DEPRECATED_MEMBER;
| ^~~~~~~
/www/server/php/74/src/ext/libxml/libxml.c:712:41: warning: ‘readcallback’ is deprecated [-Wdeprecated-declarations]
712 | pib->readcallback = php_libxml_streams_IO_read;
| ^~~
/usr/include/libxml2/libxml/xmlIO.h:128:28: note: declared here
128 | xmlInputReadCallback readcallback XML_DEPRECATED_MEMBER;
| ^~~~~~~~~~~~
/www/server/php/74/src/ext/libxml/libxml.c:713:41: warning: ‘closecallback’ is deprecated [-Wdeprecated-declarations]
713 | pib->closecallback = php_libxml_streams_IO_close;
| ^~~
/usr/include/libxml2/libxml/xmlIO.h:129:28: note: declared here
129 | xmlInputCloseCallback closecallback XML_DEPRECATED_MEMBER;
| ^~~~~~~~~~~~~
/www/server/php/74/src/ext/libxml/libxml.c: In function ‘php_libxml_shutdown’:
/www/server/php/74/src/ext/libxml/libxml.c:826:17: warning: ‘xmlRelaxNGCleanupTypes’ is deprecated: See https://gnome.pages.gitlab.gnome.org/libxml2/html/deprecated.html [-Wdeprecated-declarations]
826 | xmlRelaxNGCleanupTypes();
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from /www/server/php/74/src/ext/libxml/libxml.c:41:
/usr/include/libxml2/libxml/relaxng.h:122:21: note: declared here
122 | xmlRelaxNGCleanupTypes (void);
| ^~~~~~~~~~~~~~~~~~~~~~
/www/server/php/74/src/ext/libxml/libxml.c: In function ‘zm_startup_libxml’:
/www/server/php/74/src/ext/libxml/libxml.c:920:54: error: ‘php_libxml_output_buffer_create_filename’ undeclared (first use in this function); did you mean ‘php_libxml_input_buffer_create_filename’?
920 | xmlOutputBufferCreateFilenameDefault(php_libxml_output_buffer_create_filename);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| php_libxml_input_buffer_create_filename
/www/server/php/74/src/ext/libxml/libxml.c:920:54: note: each undeclared identifier is reported only once for each function it appears in
/www/server/php/74/src/ext/libxml/libxml.c: In function ‘zm_activate_libxml’:
/www/server/php/74/src/ext/libxml/libxml.c:933:54: error: ‘php_libxml_output_buffer_create_filename’ undeclared (first use in this function); did you mean ‘php_libxml_input_buffer_create_filename’?
933 | xmlOutputBufferCreateFilenameDefault(php_libxml_output_buffer_create_filename);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| php_libxml_input_buffer_create_filename
/www/server/php/74/src/ext/libxml/libxml.c: In function ‘zif_libxml_use_internal_errors’:
/www/server/php/74/src/ext/libxml/libxml.c:1032:48: warning: comparison of distinct pointer types lacks a cast
1032 | if (current_handler && current_handler == php_libxml_structured_error_handler) {
| ^~
/www/server/php/74/src/ext/libxml/libxml.c:1050:49: warning: passing argument 2 of ‘xmlSetStructuredErrorFunc’ from incompatible pointer type [-Wincompatible-pointer-types]
1050 | xmlSetStructuredErrorFunc(NULL, php_libxml_structured_error_handler);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| void (*)(void *, xmlError *) {aka void (*)(void *, struct _xmlError *)}
In file included from /usr/include/libxml2/libxml/valid.h:19,
from /usr/include/libxml2/libxml/parser.h:24:
/usr/include/libxml2/libxml/xmlerror.h:1005:57: note: expected ‘xmlStructuredErrorFunc’ {aka ‘void (*)(void *, const struct _xmlError *)’} but argument is of type ‘void (*)(void *, xmlError *)’ {aka ‘void (*)(void *, struct _xmlError *)’}
1005 | xmlStructuredErrorFunc handler);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
/www/server/php/74/src/ext/libxml/libxml.c: In function ‘zif_libxml_get_last_error’:
/www/server/php/74/src/ext/libxml/libxml.c:1066:15: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
1066 | error = xmlGetLastError();
| ^
/www/server/php/74/src/ext/libxml/libxml.c: At top level:
/www/server/php/74/src/ext/libxml/libxml.c:387:12: warning: ‘php_libxml_streams_IO_write’ defined but not used [-Wunused-function]
387 | static int php_libxml_streams_IO_write(void *context, const char *buffer, int len)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/www/server/php/74/src/ext/libxml/libxml.c:377:14: warning: ‘php_libxml_streams_IO_open_write_wrapper’ defined but not used [-Wunused-function]
377 | static void *php_libxml_streams_IO_open_write_wrapper(const char *filename)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:710: ext/libxml/libxml.lo] Error 1
========================================================
Ubuntu 26.04 LTS
\l
Bit:64 Mem:23513M Core:10 gcc:15.2.0 cmake:4.2.3
Linux 7.0.0-22-generic x86_64
ERROR: php-7.4.33 install failed.
安装失败,请截图以上报错信息发帖至论坛www.bt.cn/bbs求助
cat: /etc/redhat-release: No such file or directory
|-Successify --- 命令已执行! ---

问题未解决?付费解决问题加Q或微信 2589053300 (即Q号又微信号)右上方扫一扫可加博主微信

所写所说,是心之所感,思之所悟,行之所得;文当无敷衍,落笔求简洁。 以所舍,求所获;有所依,方所成!

赏
支付宝赞助
微信赞助

免责声明,若由于商用引起版权纠纷,一切责任均由使用者承担。

您必须遵守我们的协议,如您下载该资源,行为将被视为对《免责声明》全部内容的认可->联系老梁投诉资源
LaoLiang.Net部分资源来自互联网收集,仅供用于学习和交流,请勿用于商业用途。如有侵权、不妥之处,请联系站长并出示版权证明以便删除。 敬请谅解! 侵权删帖/违法举报/投稿等事务联系邮箱:service@laoliang.net
意在交流学习,欢迎赞赏评论,如有谬误,请联系指正;转载请注明出处: » Ubuntu 26.04系统下宝塔控制面板安装PHP7.4失败的说明

发表回复

本站承接:网站web修改及维护;网站推广(SEM,SEO);软件安装与调试;服务器部署;APP开发与维护;
各财务软件安装调试服务(如,金蝶,用友,管家婆,速达,星宇等);OA系列,客户管理系统,人力资源,超市POS,医药管理等;

立即查看 了解详情