宝塔用户_raxcbc 发表于 2026-6-14 14:24:12

【已解答】ubuntu-server 26.0.4安装php8.0极速版失败

为了能快速了解并处理您的问题,请提供以下基础信息:面板、插件版本:Linux面板11.8.0
系统版本:Description:    Ubuntu 26.04 LTSRelease:      26.04Codename:       resolut
问题描述:无法安装php服务,比如php8.0,php7.4,php7.1都安不了
相关图(日志、错误):
/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: *** Error 1========================================================Ubuntu 26.04 LTS\l

大炮运维V587 发表于 2026-6-15 10:28:06

您好,Ubuntu26系统安装PHP8.3+,其他版本的PHP无法安装是因为Ubuntu26系统太新了,PHP8.3以下的是因为PHP不支持Ubuntu26
建议:
如果当前是最新的系统,没有业务部署,建议撤回Ubuntu24系统,这个可以安装PHP 7.xPHP8.x兼容性比较好
如果当前业务必须使用Ubuntu26,那么请安装PHP8.3+的版本
页: [1]
查看完整版本: 【已解答】ubuntu-server 26.0.4安装php8.0极速版失败