Answer the question
In order to leave comments, you need to log in
Installing lxml on CentOS. How to overcome the error?
Installed Python 2.7 on CentOS 6.7 minimal. Registered PATH. Installed pip. When you enter the pip install lxml command, you will get an error:
Compile failed: command 'gcc' failed with exit status 1
cc -I/usr/include/libxml2 -c /tmp/xmlXPathInitC7CEI7.c -o tmp/xmlXPathInitC7CEI7.o
/tmp/xmlXPathInitC7CEI7.c:1:26: error: libxml /xpath.h: No such file or directory
**************************************** *****************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
******************************************************* *******************************
error: command 'gcc' failed with exit status 1
-------- --------------------------------
Command "/usr/local/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-K8ZHxF/lxml/setup.py';exec(compile(getattr(tokenize, ' open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-zCOkGl-record/install -record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-K8ZHxF/lxml/
Answer the question
In order to leave comments, you need to log in
Try
apt-get install libxml2-dev
apt-get install libxslt1-dev
pip install lxml
easy_install lxml
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question