【发布时间】:2021-07-22 01:01:40
【问题描述】:
我已经为此搜索了线程的音调。
当我安装 python-ldap 我得到:
In file included from Modules/LDAPObject.c:3:0:
Modules/common.h:9:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
我有 Python 3.6 并且我已经安装了 python36-devel 和 openldap-devel
据我所知:
[xfft@hostname Scripts]$ pkg-config --cflags python
-I/usr/include/python2.7
[xfft@hostname Scripts]$ pkg-config --libs python
-lpython2.7
在 /usr/include/ 我有:
drwxr-xr-x. 2 root root 4096 Apr 28 14:35 python2.7
drwxr-xr-x. 2 root root 4096 Apr 28 14:51 python3.6m
在 python3.6m 中有 Python.h
但是如何将 pkg-config --cflags python 和 pkg-config --libs python 指向这个目录呢?
【问题讨论】:
标签: python gcc gcc-warning pkg-config