python - Install lxml on Centos 7 - error: command 'gcc' failed with exit status 4 -


i'm using python 3.4 in virtual environment:

(af)[root@domain backend]# pip --version pip 7.1.0 /home/af/af-stage/backend/.ves/af/lib/python3.4/site-packages (python 3.4) 

installation of lxml failed "error: command 'gcc' failed exit status 4":

(af)[root@domain backend]# pip install lxml using pip version 7.1.0, version 7.1.2 available. should consider upgrading via 'pip install --upgrade pip' command. collecting lxml   using cached lxml-3.5.0.tar.gz building wheels collected packages: lxml   running setup.py bdist_wheel lxml   complete output command /home/af/af-stage/backend/.ves/af/bin/python3.4 -c "import setuptools;__file__='/tmp/pip-build-tlogtyk2/lxml/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpod9hcw0ypip-wheel-:   building lxml version 3.5.0.   building without cython.   using build configuration of libxslt 1.1.28   building against libxml2/libxslt in following directory: /usr/lib64   running bdist_wheel   running build   running build_py   creating build   creating build/lib.linux-x86_64-3.4   creating build/lib.linux-x86_64-3.4/lxml   copying src/lxml/usedoctest.py -> build/lib.linux-x86_64-3.4/lxml   copying src/lxml/__init__.py -> build/lib.linux-x86_64-3.4/lxml   copying src/lxml/builder.py -> build/lib.linux-x86_64-3.4/lxml   copying src/lxml/sax.py -> build/lib.linux-x86_64-3.4/lxml   copying src/lxml/doctestcompare.py -> build/lib.linux-x86_64-3.4/lxml   copying src/lxml/_elementpath.py -> build/lib.linux-x86_64-3.4/lxml   copying src/lxml/cssselect.py -> build/lib.linux-x86_64-3.4/lxml   copying src/lxml/elementinclude.py -> build/lib.linux-x86_64-3.4/lxml   copying src/lxml/pyclasslookup.py -> build/lib.linux-x86_64-3.4/lxml   creating build/lib.linux-x86_64-3.4/lxml/includes   copying src/lxml/includes/__init__.py -> build/lib.linux-x86_64-3.4/lxml/includes   creating build/lib.linux-x86_64-3.4/lxml/html   copying src/lxml/html/usedoctest.py -> build/lib.linux-x86_64-3.4/lxml/html   copying src/lxml/html/html5parser.py -> build/lib.linux-x86_64-3.4/lxml/html   copying src/lxml/html/__init__.py -> build/lib.linux-x86_64-3.4/lxml/html   copying src/lxml/html/_html5builder.py -> build/lib.linux-x86_64-3.4/lxml/html   copying src/lxml/html/builder.py -> build/lib.linux-x86_64-3.4/lxml/html   copying src/lxml/html/_setmixin.py -> build/lib.linux-x86_64-3.4/lxml/html   copying src/lxml/html/_diffcommand.py -> build/lib.linux-x86_64-3.4/lxml/html   copying src/lxml/html/elementsoup.py -> build/lib.linux-x86_64-3.4/lxml/html   copying src/lxml/html/formfill.py -> build/lib.linux-x86_64-3.4/lxml/html   copying src/lxml/html/soupparser.py -> build/lib.linux-x86_64-3.4/lxml/html   copying src/lxml/html/diff.py -> build/lib.linux-x86_64-3.4/lxml/html   copying src/lxml/html/defs.py -> build/lib.linux-x86_64-3.4/lxml/html   copying src/lxml/html/clean.py -> build/lib.linux-x86_64-3.4/lxml/html   creating build/lib.linux-x86_64-3.4/lxml/isoschematron   copying src/lxml/isoschematron/__init__.py -> build/lib.linux-x86_64-3.4/lxml/isoschematron   copying src/lxml/lxml.etree.h -> build/lib.linux-x86_64-3.4/lxml   copying src/lxml/lxml.etree_api.h -> build/lib.linux-x86_64-3.4/lxml   copying src/lxml/includes/etreepublic.pxd -> build/lib.linux-x86_64-3.4/lxml/includes   copying src/lxml/includes/uri.pxd -> build/lib.linux-x86_64-3.4/lxml/includes   copying src/lxml/includes/xmlschema.pxd -> build/lib.linux-x86_64-3.4/lxml/includes   copying src/lxml/includes/config.pxd -> build/lib.linux-x86_64-3.4/lxml/includes   copying src/lxml/includes/xmlerror.pxd -> build/lib.linux-x86_64-3.4/lxml/includes   copying src/lxml/includes/xslt.pxd -> build/lib.linux-x86_64-3.4/lxml/includes   copying src/lxml/includes/tree.pxd -> build/lib.linux-x86_64-3.4/lxml/includes   copying src/lxml/includes/xpath.pxd -> build/lib.linux-x86_64-3.4/lxml/includes   copying src/lxml/includes/relaxng.pxd -> build/lib.linux-x86_64-3.4/lxml/includes   copying src/lxml/includes/htmlparser.pxd -> build/lib.linux-x86_64-3.4/lxml/includes   copying src/lxml/includes/xinclude.pxd -> build/lib.linux-x86_64-3.4/lxml/includes   copying src/lxml/includes/xmlparser.pxd -> build/lib.linux-x86_64-3.4/lxml/includes   copying src/lxml/includes/schematron.pxd -> build/lib.linux-x86_64-3.4/lxml/includes   copying src/lxml/includes/dtdvalid.pxd -> build/lib.linux-x86_64-3.4/lxml/includes   copying src/lxml/includes/c14n.pxd -> build/lib.linux-x86_64-3.4/lxml/includes   copying src/lxml/includes/lxml-version.h -> build/lib.linux-x86_64-3.4/lxml/includes   copying src/lxml/includes/etree_defs.h -> build/lib.linux-x86_64-3.4/lxml/includes   creating build/lib.linux-x86_64-3.4/lxml/isoschematron/resources   creating build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/rng   copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/rng   creating build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl   copying src/lxml/isoschematron/resources/xsl/rng2schtrn.xsl -> build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl   copying src/lxml/isoschematron/resources/xsl/xsd2schtrn.xsl -> build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl   creating build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl/iso-schematron-xslt1   copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl/iso-schematron-xslt1   copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl/iso-schematron-xslt1   copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl/iso-schematron-xslt1   copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl/iso-schematron-xslt1   copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl/iso-schematron-xslt1   copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.linux-x86_64-3.4/lxml/isoschematron/resources/xsl/iso-schematron-xslt1   running build_ext   building 'lxml.etree' extension   creating build/temp.linux-x86_64-3.4   creating build/temp.linux-x86_64-3.4/src   creating build/temp.linux-x86_64-3.4/src/lxml   gcc -pthread -wno-unused-result -ddynamic_annotations_enabled=1 -dndebug -o2 -g -pipe -wall -wp,-d_fortify_source=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -d_gnu_source -fpic -fwrapv -fpic -i/usr/include/libxml2 -isrc/lxml/includes -i/usr/include/python3.4m -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-3.4/src/lxml/lxml.etree.o -w   {standard input}: assembler messages:   {standard input}:1531298: error: unknown pseudo-op: `.uleb'   gcc: internal compiler error: killed (program cc1)   please submit full bug report,   preprocessed source if appropriate.   see <http://bugzilla.redhat.com/bugzilla> instructions.   compile failed: command 'gcc' failed exit status 4   creating tmp   cc -i/usr/include/libxml2 -i/usr/include/libxml2 -c /tmp/xmlxpathinitpm92p5c8.c -o tmp/xmlxpathinitpm92p5c8.o   cc tmp/xmlxpathinitpm92p5c8.o -l/usr/lib64 -lxml2 -o a.out   error: command 'gcc' failed exit status 4    ----------------------------------------   failed building wheel lxml failed build lxml installing collected packages: lxml   running setup.py install lxml     complete output command /home/af/af-stage/backend/.ves/af/bin/python3.4 -c "import setuptools, tokenize;__file__='/tmp/pip-build-tlogtyk2/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-99hwjy1o-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/af/af-stage/backend/.ves/af/include/site/python3.4/lxml:     building lxml version 3.5.0.     building without cython.     using build configuration of libxslt 1.1.28     building against libxml2/libxslt in following directory: /usr/lib64     running install     running build     running build_py     copying src/lxml/includes/lxml-version.h -> build/lib.linux-x86_64-3.4/lxml/includes     running build_ext     building 'lxml.etree' extension     gcc -pthread -wno-unused-result -ddynamic_annotations_enabled=1 -dndebug -o2 -g -pipe -wall -wp,-d_fortify_source=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -d_gnu_source -fpic -fwrapv -fpic -i/usr/include/libxml2 -isrc/lxml/includes -i/usr/include/python3.4m -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-3.4/src/lxml/lxml.etree.o -w     {standard input}: assembler messages:     {standard input}:1320351: error: unknown pseudo-op: `.uleb1'     gcc: internal compiler error: killed (program cc1)     please submit full bug report,     preprocessed source if appropriate.     see <http://bugzilla.redhat.com/bugzilla> instructions.     compile failed: command 'gcc' failed exit status 4     cc -i/usr/include/libxml2 -i/usr/include/libxml2 -c /tmp/xmlxpathinit3tj66iu0.c -o tmp/xmlxpathinit3tj66iu0.o     cc tmp/xmlxpathinit3tj66iu0.o -l/usr/lib64 -lxml2 -o a.out     error: command 'gcc' failed exit status 4      ---------------------------------------- command "/home/af/af-stage/backend/.ves/af/bin/python3.4 -c "import setuptools, tokenize;__file__='/tmp/pip-build-tlogtyk2/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-99hwjy1o-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/af/af-stage/backend/.ves/af/include/site/python3.4/lxml" failed error code 1 in /tmp/pip-build-tlogtyk2/lxml 

notes:
i've done yum install libxslt-devel libxml2-devel

you need use yum install python-lxml. of course, lxml module depend on libxml2 libxslt libxml2-devel libxslt-devel.


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -