gpt4 book ai didi

ubuntu - 在linux上安装libxml2的问题

转载 作者:行者123 更新时间:2023-12-02 01:16:55 26 4
gpt4 key购买 nike

我正在尝试在虚拟机上的 Ubuntu 上安装 libxml2-2.9.1。我按照下面给出的两个链接中的步骤进行操作: http://www.linuxfromscratch.org/blfs/view/svn/general/libxml2.html http://www.geeksww.com/tutorials/libraries/libxml/installation/installing_libxml_on_ubuntu_linux.php#comment

编译步骤后我陷入困境。当我点击任何一个链接时,我都会遇到同样的错误。错误是

make[3]: Leaving directory `/home/abhijit/Documents/libxml2-2.9.1/doc/examples'
make[2]: Leaving directory `/home/abhijit/Documents/libxml2-2.9.1/doc'
Making all in example
make[2]: Entering directory `/home/abhijit/Documents/libxml2-2.9.1/example'
CC gjobread.o
CCLD gjobread
make[2]: Leaving directory `/home/abhijit/Documents/libxml2-2.9.1/example'
Making all in xstc
make[2]: Entering directory `/home/abhijit/Documents/libxml2-2.9.1/xstc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/abhijit/Documents/libxml2-2.9.1/xstc'
Making all in python
make[2]: Entering directory `/home/abhijit/Documents/libxml2-2.9.1/python'
make all-recursive
make[3]: Entering directory `/home/abhijit/Documents/libxml2-2.9.1/python'
Making all in .
make[4]: Entering directory `/home/abhijit/Documents/libxml2-2.9.1/python'
CC libxml.lo
libxml.c:14: fatal error: Python.h: No such file or directory
compilation terminated.
make[4]: *** [libxml.lo] Error 1
make[4]: Leaving directory `/home/abhijit/Documents/libxml2-2.9.1/python'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/abhijit/Documents/libxml2-2.9.1/python'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/abhijit/Documents/libxml2-2.9.1/python'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/abhijit/Documents/libxml2-2.9.1'
make: *** [all] Error 2

请帮忙。

最佳答案

您需要 python header 。由于您使用的是 Ubuntu,因此您可能可以避免编译 python。尝试一下

$ sudo apt-get install python-dev

然后编译libxml2。

或者,您发布的 LFS 链接指向编译 python 的说明。

关于ubuntu - 在linux上安装libxml2的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17348302/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com