724运维节特惠,3年企业版2399元,立省600元!查看活动
当前位置:论坛首页 > Linux面板 > 求助

【已解答】Ubuntu 26 安装不了php7.3

发表在 Linux面板2026-6-17 10:32 [复制链接] 1 282

为了能快速了解并处理您的问题,请提供以下基础信息:
面板、插件版本:[backcolor=rgba(255, 255, 255, 0.7)]v11.8.0

系统版本:Ubuntu 26.04 LTS

问题描述:安装软件报错

相关截图(日志、错误):/bin/sh /www/server/php/73/src/libtool --silent --preserve-dup-deps --mode=install cp ext/opcache/opcache.la /www/server/php/73/src/modules
/bin/sh /www/server/php/73/src/libtool --silent --preserve-dup-deps --mode=compile /usr/bin/gcc-13 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -Iext/libxml/ -I/www/server/php/73/src/ext/libxml/ -DPHP_ATOM_INC -I/www/server/php/73/src/include -I/www/server/php/73/src/main -I/www/server/php/73/src -I/www/server/php/73/src/ext/date/lib -I/usr/include/libxml2 -I/usr/local/openssl/include -I/usr/local/curl/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/local/icu/include -I/www/server/php/73/src/ext/mbstring/oniguruma -I/www/server/php/73/src/ext/mbstring/libmbfl -I/www/server/php/73/src/ext/mbstring/libmbfl/mbfl -I/www/server/php/73/src/ext/sqlite3/libsqlite -I/usr/local/libsodium/include -I/www/server/php/73/src/TSRM -I/www/server/php/73/src/Zend    -I/usr/include -g -O2 -fvisibility=hidden -DZEND_SIGNALS   -c /www/server/php/73/src/ext/libxml/libxml.c -o ext/libxml/libxml.lo /www/server/php/73/src/ext/libxml/libxml.c: In function ‘php_libxml_input_buffer_create_filename’:/www/server/php/73/src/ext/libxml/libxml.c:418:17: warning: ‘context’ is deprecated [-Wdeprecated-declarations]  418 |                 ret->context = context;      |                 ^~~In file included from /usr/include/libxml2/libxml/parser.h:30,                 from /www/server/php/73/src/ext/libxml/libxml.c:37:/usr/include/libxml2/libxml/xmlIO.h:127:28: note: declared here  127 |     void*                  context XML_DEPRECATED_MEMBER;      |                            ^~~~~~~/www/server/php/73/src/ext/libxml/libxml.c:419:17: warning: ‘readcallback’ is deprecated [-Wdeprecated-declarations]  419 |                 ret->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/73/src/ext/libxml/libxml.c:420:17: warning: ‘closecallback’ is deprecated [-Wdeprecated-declarations]  420 |                 ret->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/73/src/ext/libxml/libxml.c: At top level:/www/server/php/73/src/ext/libxml/libxml.c:430:47: error: expected ‘;’, ‘,’ or ‘)’ before ‘ATTRIBUTE_UNUSED’  430 |                               int compression ATTRIBUTE_UNUSED)      |                                               ^~~~~~~~~~~~~~~~/www/server/php/73/src/ext/libxml/libxml.c: In function ‘_php_libxml_external_entity_loader’:/www/server/php/73/src/ext/libxml/libxml.c:657:41: warning: ‘context’ is deprecated [-Wdeprecated-declarations]  657 |                                         pib->context = stream;      |                                         ^~~/usr/include/libxml2/libxml/xmlIO.h:127:28: note: declared here  127 |     void*                  context XML_DEPRECATED_MEMBER;      |                            ^~~~~~~/www/server/php/73/src/ext/libxml/libxml.c:658:41: warning: ‘readcallback’ is deprecated [-Wdeprecated-declarations]  658 |                                         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/73/src/ext/libxml/libxml.c:659:41: warning: ‘closecallback’ is deprecated [-Wdeprecated-declarations]  659 |                                         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/73/src/ext/libxml/libxml.c: In function ‘php_libxml_shutdown’:/www/server/php/73/src/ext/libxml/libxml.c:769:17: warning: ‘xmlRelaxNGCleanupTypes’ is deprecated: See https://gnome.pages.gitlab.gnome.org/libxml2/html/deprecated.html [-Wdeprecated-declarations]  769 |                 xmlRelaxNGCleanupTypes();      |                 ^~~~~~~~~~~~~~~~~~~~~~In file included from /www/server/php/73/src/ext/libxml/libxml.c:44:/usr/include/libxml2/libxml/relaxng.h:122:21: note: declared here  122 |                     xmlRelaxNGCleanupTypes      (void);      |                     ^~~~~~~~~~~~~~~~~~~~~~/www/server/php/73/src/ext/libxml/libxml.c: In function ‘zm_startup_libxml’:/www/server/php/73/src/ext/libxml/libxml.c:867:54: error: ‘php_libxml_output_buffer_create_filename’ undeclared (first use in this function); did you mean ‘php_libxml_input_buffer_create_filename’?  867 |                 xmlOutputBufferCreateFilenameDefault(php_libxml_output_buffer_create_filename);      |                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      |                                                      php_libxml_input_buffer_create_filename/www/server/php/73/src/ext/libxml/libxml.c:867:54: note: each undeclared identifier is reported only once for each function it appears in/www/server/php/73/src/ext/libxml/libxml.c: In function ‘zm_activate_libxml’:/www/server/php/73/src/ext/libxml/libxml.c:880:54: error: ‘php_libxml_output_buffer_create_filename’ undeclared (first use in this function); did you mean ‘php_libxml_input_buffer_create_filename’?  880 |                 xmlOutputBufferCreateFilenameDefault(php_libxml_output_buffer_create_filename);      |                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      |                                                      php_libxml_input_buffer_create_filename/www/server/php/73/src/ext/libxml/libxml.c: In function ‘zif_libxml_use_internal_errors’:/www/server/php/73/src/ext/libxml/libxml.c:979:48: warning: comparison of distinct pointer types lacks a cast  979 |         if (current_handler && current_handler == php_libxml_structured_error_handler) {      |                                                ^~/www/server/php/73/src/ext/libxml/libxml.c:997:49: warning: passing argument 2 of ‘xmlSetStructuredErrorFunc’ from incompatible pointer type [-Wincompatible-pointer-types]  997 |                 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/73/src/ext/libxml/libxml.c: In function ‘zif_libxml_get_last_error’:/www/server/php/73/src/ext/libxml/libxml.c:1013:15: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 1013 |         error = xmlGetLastError();      |               ^make: *** [Makefile:734: ext/libxml/libxml.lo] Error 1

使用道具 举报 只看该作者 回复
发表于 2026-6-17 10:39:23 | 显示全部楼层
PHP7.xPHP官方已经停止维护,Ubuntu26是今年5月份推出的新系统,PHP为对此做兼容,如果非要使用PHP7.x建议降级系统到Ubuntu24,这个系统是可以的,如果不是必要的,请更换PHP8.3+的版本
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

紧急运维服务

响应时间:3分钟

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

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

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

点击联系技术分析

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

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