宝塔用户_ynlaau 发表于 2026-6-17 10:32:04

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

为了能快速了解并处理您的问题,请提供以下基础信息:面板、插件版本: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 here127 |   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 here128 |   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 here129 |   xmlInputCloseCallbackclosecallback 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 here127 |   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 here128 |   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 here129 |   xmlInputCloseCallbackclosecallback 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 here122 |                     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 cast979 |         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: *** Error 1

大炮运维V587 发表于 2026-6-17 10:39:23

PHP7.xPHP官方已经停止维护,Ubuntu26是今年5月份推出的新系统,PHP为对此做兼容,如果非要使用PHP7.x建议降级系统到Ubuntu24,这个系统是可以的,如果不是必要的,请更换PHP8.3+的版本
页: [1]
查看完整版本: 【已解答】Ubuntu 26 安装不了php7.3