如何在Ubuntu上安装lxml
我在Ubuntu 11上使用easy_install安装lxml时遇到了困难。
当我输入时,$ easy_install lxml
我得到:
Searching for lxmlReading http://pypi.python.org/simple/lxml/Reading http://codespeak.net/lxmlBest match: lxml 2.3Downloading http://lxml.de/files/lxml-2.3.tgzProcessing lxml-2.3.tgzRunning lxml-2.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-7UdQOZ/lxml-2.3/egg-dist-tmp-GacQGyBuilding lxml version 2.3.Building without Cython.ERROR: /bin/sh: xslt-config: not found** make sure the development packages of libxml2 and libxslt are installed **Using build configuration of libxslt In file included from src/lxml/lxml.etree.c:227:0:src/lxml/etree_defs.h:9:31: fatal error: libxml/xmlversion.h: No such file or directory compilation terminated.
似乎libxslt
或libxml2
没有安装。我已尝试按照http://www.techsww.com/tutorials/libraries/libxslt/installation/installing_libxslt_on_ubuntu_linux.php和http://www.techsww.com/tutorials/libraries/libxml/installation/installing_libxml_on_ubuntu_linux上的说明进行操作。 PHP没有成功。
如果我尝试wget ftp://xmlsoft.org/libxml2/libxml2-sources-2.6.27.tar.gz
我得到
<successful connection info>==> SYST ... done. ==> PWD ... done.==> TYPE I ... done. ==> CWD (1) /libxml2 ... done.==> SIZE libxml2-sources-2.6.27.tar.gz ... done.==> PASV ... done. ==> RETR libxml2-sources-2.6.27.tar.gz ... No such file `libxml2-sources-2.6.27.tar.gz'.
如果我先尝试另一个,我会到达,./configure --prefix=/usr/local/libxslt --with-libxml-prefix=/usr/local/libxml2
最终会失败:
checking for libxml libraries >= 2.6.27... configure: error: Could not find libxml2 anywhere, check ftp://xmlsoft.org/.
我试过两个版本2.6.27
和2.6.29
的libxml2
没什么区别。
不遗余力,我已成功完成sudo apt-get install libxml2-dev
,但这没有任何改变。
慕姐4208626
梵蒂冈之花
RISEBY
相关分类