解决libxml/xmlversion.h: No such file or directory

报错如下:

/tmp/pip-build-imUeln/lxml/src/lxml/includes/etree_defs.h:14:31: fatal error: libxml/xmlversion.h: No such file or directory
     #include "libxml/xmlversion.h"
                                   ^
    compilation terminated.
    error: command 'gcc' failed with exit status 1

解决:

export C_INCLUDE_PATH=/usr/include/libxml2/

仍发生错误:

ERROR: /bin/sh: xslt-config: command not found

解决:

yum install libxslt-devel

再安装lxml 或 scrapy 成功。

本文为原创文章,转载请注明出处。

原文链接:https://850406.xyz/post/解决libxml-xmlversion-h-no-such-file-or-directory

评论(0)

还没有评论,来抢沙发吧~

验证码