2016-05-10 11 views
2

Ich habe versucht, die Python-Bibliothek lxml zu installieren, aber hier ist die Ausgabe. Ich habe die letzte halbe Stunde damit verbracht, Abhängigkeiten zu untersuchen, aber ich glaube nicht, dass das das Problem ist.Installing lxml: Fehler: CFI am Ende der Datei öffnen; fehlende .cfi_endproc Direktive

Ich verwende dieses Skript auf CentOS 6 mit 512 MB RAM. Es ist ein frischer Server von Digital Ocean, und es läuft fast nichts.

Vollständige Fehlerprotokoll unten.

# sudo pip install lxml 
DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6 
Collecting lxml 
    Using cached lxml-3.6.0.tar.gz 
Installing collected packages: lxml 
    Running setup.py install for lxml ... error 
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-GiDliY/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-0UHULP-record/install-record.txt --single-version-externally-managed --compile: 
    Building lxml version 3.6.0. 
    Building without Cython. 
    Using build configuration of libxslt 1.1.26 
    Building against libxml2/libxslt in the following directory: /usr/lib64 
    running install 
    running build 
    running build_py 
    creating build 
    creating build/lib.linux-x86_64-2.6 
    creating build/lib.linux-x86_64-2.6/lxml 
    copying src/lxml/cssselect.py -> build/lib.linux-x86_64-2.6/lxml 
    copying src/lxml/pyclasslookup.py -> build/lib.linux-x86_64-2.6/lxml 
    copying src/lxml/doctestcompare.py -> build/lib.linux-x86_64-2.6/lxml 
    copying src/lxml/ElementInclude.py -> build/lib.linux-x86_64-2.6/lxml 
    copying src/lxml/_elementpath.py -> build/lib.linux-x86_64-2.6/lxml 
    copying src/lxml/usedoctest.py -> build/lib.linux-x86_64-2.6/lxml 
    copying src/lxml/__init__.py -> build/lib.linux-x86_64-2.6/lxml 
    copying src/lxml/builder.py -> build/lib.linux-x86_64-2.6/lxml 
    copying src/lxml/sax.py -> build/lib.linux-x86_64-2.6/lxml 
    creating build/lib.linux-x86_64-2.6/lxml/includes 
    copying src/lxml/includes/__init__.py -> build/lib.linux-x86_64-2.6/lxml/includes 
    creating build/lib.linux-x86_64-2.6/lxml/html 
    copying src/lxml/html/_html5builder.py -> build/lib.linux-x86_64-2.6/lxml/html 
    copying src/lxml/html/defs.py -> build/lib.linux-x86_64-2.6/lxml/html 
    copying src/lxml/html/clean.py -> build/lib.linux-x86_64-2.6/lxml/html 
    copying src/lxml/html/_setmixin.py -> build/lib.linux-x86_64-2.6/lxml/html 
    copying src/lxml/html/formfill.py -> build/lib.linux-x86_64-2.6/lxml/html 
    copying src/lxml/html/soupparser.py -> build/lib.linux-x86_64-2.6/lxml/html 
    copying src/lxml/html/usedoctest.py -> build/lib.linux-x86_64-2.6/lxml/html 
    copying src/lxml/html/ElementSoup.py -> build/lib.linux-x86_64-2.6/lxml/html 
    copying src/lxml/html/__init__.py -> build/lib.linux-x86_64-2.6/lxml/html 
    copying src/lxml/html/_diffcommand.py -> build/lib.linux-x86_64-2.6/lxml/html 
    copying src/lxml/html/builder.py -> build/lib.linux-x86_64-2.6/lxml/html 
    copying src/lxml/html/diff.py -> build/lib.linux-x86_64-2.6/lxml/html 
    copying src/lxml/html/html5parser.py -> build/lib.linux-x86_64-2.6/lxml/html 
    creating build/lib.linux-x86_64-2.6/lxml/isoschematron 
    copying src/lxml/isoschematron/__init__.py -> build/lib.linux-x86_64-2.6/lxml/isoschematron 
    copying src/lxml/lxml.etree.h -> build/lib.linux-x86_64-2.6/lxml 
    copying src/lxml/lxml.etree_api.h -> build/lib.linux-x86_64-2.6/lxml 
    copying src/lxml/includes/relaxng.pxd -> build/lib.linux-x86_64-2.6/lxml/includes 
    copying src/lxml/includes/config.pxd -> build/lib.linux-x86_64-2.6/lxml/includes 
    copying src/lxml/includes/dtdvalid.pxd -> build/lib.linux-x86_64-2.6/lxml/includes 
    copying src/lxml/includes/xslt.pxd -> build/lib.linux-x86_64-2.6/lxml/includes 
    copying src/lxml/includes/etreepublic.pxd -> build/lib.linux-x86_64-2.6/lxml/includes 
    copying src/lxml/includes/c14n.pxd -> build/lib.linux-x86_64-2.6/lxml/includes 
    copying src/lxml/includes/uri.pxd -> build/lib.linux-x86_64-2.6/lxml/includes 
    copying src/lxml/includes/xpath.pxd -> build/lib.linux-x86_64-2.6/lxml/includes 
    copying src/lxml/includes/xmlschema.pxd -> build/lib.linux-x86_64-2.6/lxml/includes 
    copying src/lxml/includes/xmlerror.pxd -> build/lib.linux-x86_64-2.6/lxml/includes 
    copying src/lxml/includes/xinclude.pxd -> build/lib.linux-x86_64-2.6/lxml/includes 
    copying src/lxml/includes/schematron.pxd -> build/lib.linux-x86_64-2.6/lxml/includes 
    copying src/lxml/includes/xmlparser.pxd -> build/lib.linux-x86_64-2.6/lxml/includes 
    copying src/lxml/includes/htmlparser.pxd -> build/lib.linux-x86_64-2.6/lxml/includes 
    copying src/lxml/includes/tree.pxd -> build/lib.linux-x86_64-2.6/lxml/includes 
    copying src/lxml/includes/lxml-version.h -> build/lib.linux-x86_64-2.6/lxml/includes 
    copying src/lxml/includes/etree_defs.h -> build/lib.linux-x86_64-2.6/lxml/includes 
    creating build/lib.linux-x86_64-2.6/lxml/isoschematron/resources 
    creating build/lib.linux-x86_64-2.6/lxml/isoschematron/resources/rng 
    copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-x86_64-2.6/lxml/isoschematron/resources/rng 
    creating build/lib.linux-x86_64-2.6/lxml/isoschematron/resources/xsl 
    copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.linux-x86_64-2.6/lxml/isoschematron/resources/xsl 
    copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.linux-x86_64-2.6/lxml/isoschematron/resources/xsl 
    creating build/lib.linux-x86_64-2.6/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-2.6/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-2.6/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-2.6/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-2.6/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-2.6/lxml/isoschematron/resources/xsl/iso-schematron-xslt1 
    copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.linux-x86_64-2.6/lxml/isoschematron/resources/xsl/iso-schematron-xslt1 
    running build_ext 
    building 'lxml.etree' extension 
    creating build/temp.linux-x86_64-2.6 
    creating build/temp.linux-x86_64-2.6/src 
    creating build/temp.linux-x86_64-2.6/src/lxml 
    gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/libxml2 -Isrc/lxml/includes -I/usr/include/python2.6 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.6/src/lxml/lxml.etree.o -w 
    {standard input}: Assembler messages: 
    {standard input}:26497: Warning: end of file not at end of a line; newline inserted 
    {standard input}:26754: Error: no such instruction: `ca' 
    {standard input}:26754: Error: open CFI at the end of file; missing .cfi_endproc directive 
    gcc: Internal error: Killed (program cc1) 
    Please submit a full bug report. 
    See <http://bugzilla.redhat.com/bugzilla> for instructions. 
    Compile failed: command 'gcc' failed with exit status 1 
    creating tmp 
    cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInituswMfK.c -o tmp/xmlXPathInituswMfK.o 
    cc tmp/xmlXPathInituswMfK.o -L/usr/lib64 -lxml2 -o a.out 
    error: command 'gcc' failed with exit status 1 

    ---------------------------------------- 
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-GiDliY/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-0UHULP-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-GiDliY/lxml/ 

Antwort

0

Grundsätzlich sind die Montagefehler kommen, weil Montage Ausgang des gcc wurde unterbrochen, als er getötet wurde. Der Gentoo-Foren-Thread deutet darauf hin, dass dies wahrscheinlich darauf zurückzuführen ist, dass gcc zu viel Speicher verbraucht hat. Sie können dies bestätigen, indem Sie nahe dem Ende der Ausgabe von dmesg nach OOM-Zeug suchen. Wenn Speicher nicht das Problem ist, haben Sie möglicherweise einen echten Fehler und sollten den Anweisungen in dem Text folgen, den Sie pastebined für das Melden des Fehlers an https://bugs.gentoo.org/. Aber bitte versuchen Sie zuerst, ob Speicher das Problem ist.

Wenn Speicher das Problem ist, stellen Sie sicher, dass Sie Swap-Partitionen auf Ihrem Computer haben und dass sie aktiviert sind. Sie können eine Zusammenfassung Ihrer aktivierten Swap-Partitionen anzeigen, indem Sie swapon -s ausführen. Wenn nichts angezeigt wird und Sie die Partition nicht partitionieren können, können Sie immer einen Trick wie # verwenden (umask 0077 & & dd if =/dev/zero von = /. Swap.img bs = 1M count = 1024 & & mkswap /.swap.img & & swapon /.swap.img) (das '#' gibt eine Eingabeaufforderung für die Root-Shell an, also geben Sie sie nicht ein). Der Forum-Thread schlägt auch vor, dass -pipe, das gcc veranlasst, mehr Speicher zu verwenden, anstatt viele temporäre Dateien zu schreiben, von CFLAGS und CXXFLAGS (durch Bearbeiten von /etc/make.conf oder /etc/portage/make.conf, je nachdem, was es verursacht) entfernt wird existiert). Wir können nicht sagen, was Ihre CFLAGS sind von dem, was Sie gepostet haben.

siehe Gentoo GCC failed emerge