如何在 ubuntu 7.10 gusty 上安装 python-lxml 2.1?

如何在 ubuntu 7.10 gusty 上安装 python-lxml 2.1?

我尝试了一下easy_install lxml==2.1,但出现以下错误

src/lxml/lxml.etree.c:120447: erreur: «XML_XPATH_UNDEF_PREFIX_ERROR" undeclared (first use in this function)
src/lxml/lxml.etree.c:120456: erreur: «XML_XPATH_UNKNOWN_FUNC_ERROR" undeclared (first use in this function)
src/lxml/lxml.etree.c:120465: erreur: «XML_XPATH_INVALID_OPERAND" undeclared (first use in this function)
src/lxml/lxml.etree.c:120474: erreur: «XML_XPATH_INVALID_TYPE" undeclared (first use in this function)
src/lxml/lxml.etree.c:120483: erreur: «XML_XPATH_INVALID_ARITY" undeclared (first use in this function)
src/lxml/lxml.etree.c:120492: erreur: «XML_XPATH_INVALID_CTXT_SIZE" undeclared (first use in this function)
src/lxml/lxml.etree.c:120501: erreur: «XML_XPATH_INVALID_CTXT_POSITION" undeclared (first use in this function)
src/lxml/lxml.etree.c:120698: erreur: «LIBXSLT_VERSION" undeclared (first use in this function)
src/lxml/lxml.etree.c:120709: erreur: «xsltLibxsltVersion" undeclared (first use in this function)
src/lxml/lxml.etree.c:120720: erreur: «__pyx_v_4lxml_5etree_XSLT_DOC_DEFAULT_LOADER" undeclared (first use in this function)
src/lxml/lxml.etree.c:120720: erreur: «xsltDocDefaultLoader" undeclared (first use in this function)
src/lxml/lxml.etree.c:120729: erreur: «__pyx_f_4lxml_5etree__xslt_doc_loader" undeclared (first use in this function)
error: Setup script exited with error: command 'gcc' failed with exit status 1

答案1

您是否安装了 libxml2-dev 和 libxslt1-dev?

此外,对 gutsy 的支持已于一年前结束,您确实应该考虑转向 hardy,它将被支持到 2013 年 4 月

相关内容