代码之家  ›  专栏  ›  技术社区  ›  Alex B

在linux上构建cyrus sasl之后,python/pip无法看到sasl.h文件

  •  1
  • Alex B  · 技术社区  · 8 年前

    注: 我无法安装libsasl2 dev,因为我没有管理权限。

    我建了cyrus-sasl-2.1.26.tar.gz:

    ./configure --prefix=/home/username/sasl
    make install 
    

    现在有头文件:

    [username@hostnamebin]$ ls ~/bin/include/sasl
    hmac-md5.h  md5global.h  md5.h  prop.h  sasl.h  saslplug.h  saslutil.h
    

    但皮普还是出错了:

    ./python -m pip install /tmp/sasl-0.2.1.tar.gz
    

    sasl/saslwrapper.h:22:23:错误:sasl/sasl.h:没有这样的文件或目录

    有没有什么方法可以让python/pip看到我的构建,而不是寻找默认的头文件?

    1 回复  |  直到 8 年前
        1
  •  1
  •   phd    8 年前

    尝试传递编译器/链接器标志:

    CFLAGS=-I"$HOME"/sasl/include LDFLAGS=-L"$HOME"/sasl/lib ./python -m pip install /tmp/sasl-0.2.1.tar.gz
    

    传递真实的目录。