Installation of NetBox
Hello,
Trying to install NetBox on a CentOS 7.0 64bits, and I'm having this errors, can you help please?
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 -Isrc/lxml/includes -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w
In file included from src/lxml/lxml.etree.c:320:0:
src/lxml/includes/etree_defs.h:14:31: fatal error: libxml/xmlversion.h: No such file or directory
#include "libxml/xmlversion.h"
^
compilation terminated.
Compile failed: command 'gcc' failed with exit status 1
creating tmp
cc -I/usr/include/libxml2 -c /tmp/xmlXPathInit4_zpBL.c -o tmp/xmlXPathInit4_zpBL.o
cc tmp/xmlXPathInit4_zpBL.o -lxml2 -o a.out
error: command 'gcc' failed with exit status 1
----------------------------------------
Rolling back uninstall of lxml
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-cp5y21/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-poQGBJ-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-cp5y21/lxml
Thank you very much.
Most likely missing this package. libxml2-devel.x86_64
@s3cur3n3t here are all the packages you need for centos yum install python python-devel python-pip git libxml2-devel libxslt-devel libffi-devel graphviz gcc openssl-devel
That is definitely the package issue - if you install the single package @dsolson1 suggested it is most likely to fix the issue.
If this is unsuccessful, install all of the packages required as stated by @changara.
If this does not work, respond and we will try to work out what else could be the issue.
Sorry I was not able to test it yet. But I will give it a try tomorrow. Sorry for late response. And then I would give you feedback on the issue.
Thanks you guys.
Ok. I did the installation of packages missing, the libxml2-devel.x86_64 already installed.
Tried the ./upgrade.sh to go forward and install netbox, but still get errors:
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 -Isrc/lxml/includes -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w In file included from src/lxml/lxml.etree.c:320:0: src/lxml/includes/etree_defs.h:14:31: fatal error: libxml/xmlversion.h: No such file or directory #include "libxml/xmlversion.h" ^ compilation terminated. Compile failed: command 'gcc' failed with exit status 1 creating tmp cc -I/usr/include/libxml2 -c /tmp/xmlXPathInitPxjoEy.c -o tmp/xmlXPathInitPxjoEy.o cc tmp/xmlXPathInitPxjoEy.o -lxml2 -o a.out error: command 'gcc' failed with exit status 1
----------------------------------------
Starting with a clean install of Centos 7 (Minimal Installation) these are the packages that I installed.
#yum install git gcc postgresql-server python-psycopg2 postgresql-devel python-devel libxml2-devel libxslt libffi-devel graphviz openssl-devel libxslt-devel httpd
#curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py" #python get-pip.py
You will also need these two packages later.
#pip install supervisor #pip install gunicorn
Looks like this has been sorted. Going to close this out as we have #262 to add CentOS instructions to the install doc now.
I took some time to respond. But thanks for the doc on CentOS install.
Perfect.
Keep up the good work guys!!!