当前位置:论坛首页 > Linux面板 > 求助

【已解答】宝塔python项目下载版本报错

发表在 Linux面板2025-8-7 14:42 [复制链接] 1 135

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

系统版本:centos7

问题描述:宝塔python项目下载版本报错

相关截图(日志、错误):

If you want a release build with all stable optimizations active (PGO, etc),
please run ./configure --enable-optimizations

gcc -std=gnu11 -pthread -c -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -I. -I./Include -DPy_BUILD_CORE -o Programs/python.o ./Programs/python.c
gcc -std=gnu11 -pthread -c -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -I. -I./Include -DPy_BUILD_CORE -o Parser/token.o Parser/token.c
gcc -std=gnu11 -pthread -c -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -I. -I./Include -DPy_BUILD_CORE -o Parser/pegen.o Parser/pegen.c
In file included from Parser/pegen.c:3:0:
./Include/internal/pycore_pystate.h:76:1: error: unknown type name ‘_Thread_local’
extern _Py_thread_local PyThreadState *_Py_tss_tstate;
^
./Include/internal/pycore_pystate.h:76:39: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
extern _Py_thread_local PyThreadState *_Py_tss_tstate;
^
./Include/internal/pycore_pystate.h: In function ‘_PyThreadState_GET’:
./Include/internal/pycore_pystate.h:97:12: error: ‘_Py_tss_tstate’ undeclared (first use in this function)
return _Py_tss_tstate;
^
./Include/internal/pycore_pystate.h:97:12: note: each undeclared identifier is reported only once for each function it appears in
./Include/internal/pycore_pystate.h:101:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
make: *** [Parser/pegen.o] Error 1
gcc -std=gnu11 -pthread -c -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -I. -I./Include -DPy_BUILD_CORE -o Parser/pegen.o Parser/pegen.c
In file included from Parser/pegen.c:3:0:
./Include/internal/pycore_pystate.h:76:1: error: unknown type name ‘_Thread_local’
extern _Py_thread_local PyThreadState *_Py_tss_tstate;
^
./Include/internal/pycore_pystate.h:76:39: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
extern _Py_thread_local PyThreadState *_Py_tss_tstate;
^
./Include/internal/pycore_pystate.h: In function ‘_PyThreadState_GET’:
./Include/internal/pycore_pystate.h:97:12: error: ‘_Py_tss_tstate’ undeclared (first use in this function)
return _Py_tss_tstate;
^
./Include/internal/pycore_pystate.h:97:12: note: each undeclared identifier is reported only once for each function it appears in
./Include/internal/pycore_pystate.h:101:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
make: *** [Parser/pegen.o] Error 1
解压安装失败!
使用道具 举报 只看该作者 回复
发表于 2025-8-7 16:46:19 | 显示全部楼层
看起来是gcc版本问题
centos7的gcc版本会比较低,可能和python不匹配
可以尝试安装低版本的python
有条件的也可以更换其他系统,centos7官方已经不维护了
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

普通问题处理

论坛响应时间:72小时

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

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

紧急运维服务

响应时间:3分钟

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

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

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

点击联系技术免费分析

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

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