堡塔618特惠活动,企业版1099元/年,永久授权最高立减20000元查看活动
当前位置:论坛首页 > Linux面板 > 求助

【待反馈】php无法安装swoole4

发表在 Linux面板2024-5-20 00:54 [复制链接] 12 187

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

系统版本:centos8

问题描述:php7.4.33无法安装Swole4扩展

相关截图(日志、错误):/usr/include/c++/8/bits/stl_set.h:109:62: error: expected primary-expression before ‘;’ token
/usr/include/c++/8/bits/stl_set.h:108:20: error: expected ‘,’ before ‘;’ tokenstatic_assert(is_same<typename remove_cv<_Key>::type, _Key>::value,^,"std::set must have a non-const, non-volatile value_type");~/usr/include/c++/8/bits/stl_set.h:109:62: error: expected string-literal before ‘;’ token"std::set must have a non-const, non-volatile value_type");^/usr/include/c++/8/bits/stl_set.h:108:20: error: expected ‘)’ before ‘;’ tokenstatic_assert(is_same<typename remove_cv<_Key>::type, _Key>::value,^)"std::set must have a non-const, non-volatile value_type");~/usr/include/c++/8/bits/stl_set.h:112:62: error: expected ‘(’ before ‘;’ token"std::set must have the same value_type as its allocator");^(/usr/include/c++/8/bits/stl_set.h:112:62: error: expected primary-expression before ‘;’ token/usr/include/c++/8/bits/stl_set.h:111:20: error: expected ‘,’ before ‘;’ tokenstatic_assert(is_same<typename _Alloc::value_type, _Key>::value,^,"std::set must have the same value_type as its allocator");~/usr/include/c++/8/bits/stl_set.h:112:62: error: expected string-literal before ‘;’ token"std::set must have the same value_type as its allocator");^/usr/include/c++/8/bits/stl_set.h:111:20: error: expected ‘)’ before ‘;’ tokenstatic_assert(is_same<typename _Alloc::value_type, _Key>::value,^)"std::set must have the same value_type as its allocator");~In file included from /usr/include/c++/8/set:62,from /root/swoole-4.8.13/include/swoole_util.h:26,from /root/swoole-4.8.13/ext-src/php_swoole_cxx.h:21,from /root/swoole-4.8.13/ext-src/php_swoole.cc:16:/usr/include/c++/8/bits/stl_multiset.h:111:67: error: expected ‘(’ before ‘;’ token"std::multiset must have a non-const, non-volatile value_type");^(/usr/include/c++/8/bits/stl_multiset.h:111:67: error: expected primary-expression before ‘;’ token/usr/include/c++/8/bits/stl_multiset.h:110:20: error: expected ‘,’ before ‘;’ tokenstatic_assert(is_same<typename remove_cv<_Key>::type, _Key>::value,^,"std::multiset must have a non-const, non-volatile value_type");~/usr/include/c++/8/bits/stl_multiset.h:111:67: error: expected string-literal before ‘;’ token"std::multiset must have a non-const, non-volatile value_type");^/usr/include/c++/8/bits/stl_multiset.h:110:20: error: expected ‘)’ before ‘;’ tokenstatic_assert(is_same<typename remove_cv<_Key>::type, _Key>::value,^)"std::multiset must have a non-const, non-volatile value_type");~/usr/include/c++/8/bits/stl_multiset.h:114:67: error: expected ‘(’ before ‘;’ token"std::multiset must have the same value_type as its allocator");^(/usr/include/c++/8/bits/stl_multiset.h:114:67: error: expected primary-expression before ‘;’ token/usr/include/c++/8/bits/stl_multiset.h:113:20: error: expected ‘,’ before ‘;’ tokenstatic_assert(is_same<typename _Alloc::value_type, _Key>::value,^,"std::multiset must have the same value_type as its allocator");~/usr/include/c++/8/bits/stl_multiset.h:114:67: error: expected string-literal before ‘;’ token"std::multiset must have the same value_type as its allocator");^/usr/include/c++/8/bits/stl_multiset.h:113:20: error: expected ‘)’ before ‘;’ tokenstatic_assert(is_same<typename _Alloc::value_type, _Key>::value,^)"std::multiset must have the same value_type as its allocator");~make: *** [Makefile:192: ext-src/php_swoole.lo] Error 1error

使用道具 举报 只看该作者 回复
发表于 2024-5-20 09:35:54 | 显示全部楼层
您好,看报错好像是您的gcc有点问题,执行下面命令重新安装一下,再去安装Swole4拓展
yum update -y
yum install -y build-essential
使用道具 举报 回复 支持 反对
发表于 2024-5-20 14:09:58 | 显示全部楼层
运维技术南一 发表于 2024-5-20 09:35
您好,看报错好像是您的gcc有点问题,执行下面命令重新安装一下,再去安装Swole4拓展
yum update -y
yum i ...

执行第二条命令的时候报错
使用道具 举报 回复 支持 反对
发表于 2024-5-20 14:24:45 | 显示全部楼层
颜少 发表于 2024-5-20 14:09
执行第二条命令的时候报错

那就执行下面的命令更新
yum reinstall -y gcc gcc-c++
使用道具 举报 回复 支持 反对
发表于 2024-5-20 14:30:40 | 显示全部楼层
运维技术南一 发表于 2024-5-20 14:24
那就执行下面的命令更新
yum reinstall -y gcc gcc-c++

还是报错,报错的内容一样的
使用道具 举报 回复 支持 反对
发表于 2024-5-20 14:49:29 | 显示全部楼层
颜少 发表于 2024-5-20 14:30
还是报错,报错的内容一样的

截图看看
使用道具 举报 回复 支持 反对
发表于 2024-5-20 14:52:22 | 显示全部楼层
使用道具 举报 回复 支持 反对
发表于 2024-5-20 14:54:43 | 显示全部楼层
使用道具 举报 回复 支持 反对
发表于 2024-5-20 15:19:22 | 显示全部楼层

从报错来看是您的仓库有问题,通过下面方法解决一下:

1、执行下面命令检查.repo文件,将重复的extras库删除或者移到别的目录
grep -r 'extras' /etc/yum.repos.d/
2、清理一下yum的缓存
yum clean all
3、重新生成缓存
yum makecache
使用道具 举报 回复 支持 反对
发表于 2024-5-20 15:57:55 | 显示全部楼层
运维技术南一 发表于 2024-5-20 15:19
从报错来看是您的仓库有问题,通过下面方法解决一下:

1、执行下面命令检查.repo文件,将重复的extras库 ...

使用道具 举报 回复 支持 反对
发表于 2024-5-20 16:35:52 | 显示全部楼层

还行不行,那就换一下安装源吧,执行下面命令
bash <(wget --no-check-certificate -qO- https://download.bt.cn/tools/fix_source.sh)
使用道具 举报 回复 支持 反对
发表于 2024-5-20 18:18:02 | 显示全部楼层
运维技术南一 发表于 2024-5-20 16:35
还行不行,那就换一下安装源吧,执行下面命令
bash

放弃了,直接重装系统,麻烦你了
使用道具 举报 回复 支持 反对
发表于 2024-5-21 09:11:14 | 显示全部楼层
颜少 发表于 2024-5-20 18:18
放弃了,直接重装系统,麻烦你了

您好,如有问题可以开新帖呢,期待您的问题。
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急问题处理

论坛响应时间:10分钟

问题处理方式:1对1处理(优先)

工作时间:白班:9:00 - 18:00

工作时间:晚班:18:00 - 24:00

立即付费处理

工作时间:09:00至24:00

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