0
点赞
收藏
分享

微信扫一扫

Ubuntu升级Python报错pydtrace_probes.h: No such file or directory


系统环境:Ubuntu

在华为云(​​https://mirrors.huaweicloud.com/python/3.9.2/​​)下载了3.9.2版本的离线包以安装Python时,遇到以下问题报错:

In file included from Python/ceval(kernel)和用户应用程序(user application)进行动态跟踪并且对系统运行不构成任何危险的技术。在任何情况下它都不是一个调试工具, 而是一个实时系统分析寻找出性能及其他问题的工具。 DTrace 是个特别好的分析工具,带有大量的帮助诊断系统问题的特性。还可以使用预先写好的脚本利用它的功能。 用户也可以通过使用 DTrace D 语言创建他们自己定制的分析工具, 以满足特定的需求。

很显然我们并不需要这个功能,因此可以尝试屏蔽该头文件的引用

找到报错的文件,内容如下:

//原始内容
#ifdef WITH_DTRACE

//修改后的内容
#ifndef WITH_DTRACE

#include "pydtrace_probes.h"

/* pydtrace_probes.h, on systems with DTrace, is auto-generated to include
`PyDTrace_{PROBE}` and `PyDTrace_{PROBE}_ENABLED()` macros for every probe
defined in pydtrace_provider.d.

Calling these functions must be guarded by a `PyDTrace_{PROBE}_ENABLED()`
check to minimize performance impact when probing is off. For example:

if (PyDTrace_FUNCTION_ENTRY_ENABLED())
PyDTrace_FUNCTION_ENTRY(f);
*/

#else

在配置python离线包时,配置内容明明是no,但不知为何仍会引用头文件

checking for --with-valgrind... no
checking for --with-dtrace... no
checking for dlopen... yes


举报

相关推荐

0 条评论