python - Is libxml2 installed?

 迷迷糊糊的Nancy 发布于 2022-10-29 15:45
  1. Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?

    building 'lxml.etree' extension
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/src
    creating build/temp.linux-x86_64-2.7/src/lxml
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Isrc/lxml/includes -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w
    In file included from src/lxml/lxml.etree.c:320:0:
    src/lxml/includes/etree_defs.h:14:31: fatal error: libxml/xmlversion.h: 没有那个文件或目录
    compilation terminated.
    Compile failed: command 'gcc' failed with exit status 1
    cc -I/usr/include/libxml2 -c /tmp/xmlXPathInitshtn_t.c -o tmp/xmlXPathInitshtn_t.o
    /tmp/xmlXPathInitshtn_t.c:1:26: fatal error: libxml/xpath.h: 没有那个文件或目录
    compilation terminated.
    *
    Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
    *
    error: command 'gcc' failed with exit status 1

1 个回答
  • sudo apt-get install libxml2-dev libxslt1-dev python-dev
    and

    apt-get install libxml2-dev libxslt1-dev python-dev

    2022-10-30 17:12 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有