颜少 发表于 2024-5-20 00:54:49

【待反馈】php无法安装swoole4

为了能快速了解并处理您的问题,请提供以下基础信息:面板、插件版本: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: *** 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:49
截图看看

http://www.xcpp.cn/1.jgp

颜少 发表于 2024-5-20 14:54:43

运维技术南一 发表于 2024-5-20 14:49
截图看看

https://cccimg.com/view.php/e2a1c99cc5a6142271bfa6cbefd941b9.jpg

堡塔运维南一 发表于 2024-5-20 15:19:22

颜少 发表于 2024-5-20 14:54


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

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库 ...

https://cccimg.com/view.php/11144372b5142c8bd06f45f4e7607552.jpg

堡塔运维南一 发表于 2024-5-20 16:35:52

颜少 发表于 2024-5-20 15:57


还行不行,那就换一下安装源吧,执行下面命令
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
放弃了,直接重装系统,麻烦你了

您好,如有问题可以开新帖呢,期待您的问题。
页: [1]
查看完整版本: 【待反馈】php无法安装swoole4