Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Install of ovirt-engine-sdk-python on Linux fails with fatal error: libxml/xmlreader.

Options
  • 02-12-2019 12:03pm
    #1
    Registered Users Posts: 5,532 ✭✭✭


    Issue taking in ovirt-engine-sdk-python from using both pip and pip3.

    ERROR: Command errored out with exit status 1:
         command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-xoMZFA/ovirt-engine-sdk-python/setup.py'"'"'; __file__='"'"'/tmp/pip-install-xoMZFA/ovirt-engine-sdk-python/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-4jJ_aR/install-record.txt --single-version-externally-managed --compile
             cwd: /tmp/pip-install-xoMZFA/ovirt-engine-sdk-python/
        Complete output (29 lines):
        4.3.3
        running install
        running build
        running build_py
        creating build
        creating build/lib.linux-x86_64-2.7
        creating build/lib.linux-x86_64-2.7/ovirtsdk4
        copying lib/ovirtsdk4/reader.py -> build/lib.linux-x86_64-2.7/ovirtsdk4
        copying lib/ovirtsdk4/readers.py -> build/lib.linux-x86_64-2.7/ovirtsdk4
        copying lib/ovirtsdk4/writers.py -> build/lib.linux-x86_64-2.7/ovirtsdk4
        copying lib/ovirtsdk4/http.py -> build/lib.linux-x86_64-2.7/ovirtsdk4
        copying lib/ovirtsdk4/__init__.py -> build/lib.linux-x86_64-2.7/ovirtsdk4
        copying lib/ovirtsdk4/types.py -> build/lib.linux-x86_64-2.7/ovirtsdk4
        copying lib/ovirtsdk4/service.py -> build/lib.linux-x86_64-2.7/ovirtsdk4
        copying lib/ovirtsdk4/version.py -> build/lib.linux-x86_64-2.7/ovirtsdk4
        copying lib/ovirtsdk4/writer.py -> build/lib.linux-x86_64-2.7/ovirtsdk4
        copying lib/ovirtsdk4/services.py -> build/lib.linux-x86_64-2.7/ovirtsdk4
        running build_ext
        building 'ovirtsdk4.xml' extension
        creating build/temp.linux-x86_64-2.7
        creating build/temp.linux-x86_64-2.7/ext
        gcc -pthread -fno-strict-aliasing -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 -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 -I/usr/include/python2.7 -c ext/xml.c -o build/temp.linux-x86_64-2.7/ext/xml.o
        gcc -pthread -fno-strict-aliasing -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 -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 -I/usr/include/python2.7 -c ext/ov_xml_module.c -o build/temp.linux-x86_64-2.7/ext/ov_xml_module.o
        gcc -pthread -fno-strict-aliasing -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 -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 -I/usr/include/python2.7 -c ext/ov_xml_reader.c -o build/temp.linux-x86_64-2.7/ext/ov_xml_reader.o
        ext/ov_xml_reader.c:20:30: fatal error: libxml/xmlreader.h: No such file or directory
         #include <libxml/xmlreader.h>
                                      ^
        compilation terminated.
        error: command 'gcc' failed with exit status 1
        ----------------------------------------
    ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-xoMZFA/ovirt-engine-sdk-python/setup.py'"'"'; __file__='"'"'/tmp/pip-install-xoMZFA/ovirt-engine-sdk-python/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-4jJ_aR/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
    



    Full output https://pastebin.com/0Eep1x5e
    Tagged:


Comments

  • Registered Users Posts: 11,977 ✭✭✭✭Giblet


    Ensure you have the development tools / sdk installed.


    Python 2 with apt
    sudo apt-get install python-dev  \
         build-essential libssl-dev libffi-dev \
         libxml2-dev libxslt1-dev zlib1g-dev \
         python-pip
    


Advertisement