Error Installing junos-python-ez in CentOS

305 views
Skip to first unread message

Kashif Rana

unread,
May 8, 2015, 5:13:30 PM5/8/15
to junos-p...@googlegroups.com
Hello Experts

I am facing trouble to install junos-python-ez library on CentOS. Below steps I followed. I made sure libraries libxml2 and libxslt are also installed.

1- Install pip

wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
python2.7 ez_setup.py

[root@localhost ~]# python -V
Python 2.7.8

[root@localhost ~]# pip -V
pip 6.1.1 from /usr/local/lib/python2.7/site-packages/pip-6.1.1-py2.7.egg (python 2.7)

2- Install junos-eznc
pip2.7 install git+https://github.com/Juniper/py-junos-eznc.git

I am getting the error:

In file included from src/lxml/lxml.etree.c:239:0:
   /tmp/pip-build-csh5ZQ/lxml/src/lxml/includes/etree_defs.h:14:31: fatal error: libxml/xmlversion.h: No such file or directory

     #include "libxml/xmlversion.h"
                                   ^
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
    Command "/usr/local/bin/python2.7 -c "import setuptools, tokenize;__file__='/tmp/pip-build-csh5ZQ/lxml/setup.py'
;exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-OrbQYV-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-csh5ZQ/lxml


Please help me.

Regards,

Kashif



Rick Sherman

unread,
May 8, 2015, 5:24:35 PM5/8/15
to junos-p...@googlegroups.com, kashif...@gmail.com
Hi Kashif,

You need the development version of those libraries.  Please see:  https://github.com/Juniper/py-junos-eznc/blob/master/INSTALL-FEDORA.md

[rsherman@mail ~]$ yum provides */xmlversion.h
</snip>

libxml2-devel-2.7.6-14.el6_5.2.i686 : Libraries, includes, etc. to develop XML and HTML applications
Repo        : base
Matched from:
Filename    : /usr/include/libxml2/libxml/xmlversion.h


-Rick

Kashif Rana

unread,
May 8, 2015, 6:16:57 PM5/8/15
to junos-p...@googlegroups.com, kashif...@gmail.com
Thanks a lot ! It worked. 
Reply all
Reply to author
Forward
0 new messages