andresriancho / w3af

w3af: web application attack and audit framework, the open source web vulnerability scanner.
http://w3af.org/
4.52k stars 1.21k forks source link

Installing W3AF #16088

Open Awaces opened 6 years ago

Awaces commented 6 years ago

I'm having issues while installing w3af, I've tried different things but none of them works.

You can create a ticket containing the following information:

Your linux distribution (usually the contents of /etc/lsb-release will be enough)

DISTRIB_ID=Kali
DISTRIB_RELEASE=kali-rolling
DISTRIB_CODENAME=kali-rolling
DISTRIB_DESCRIPTION="Kali GNU/Linux Rolling"

The contents of the /tmp/w3af_dependency_install.sh file

#!/bin/bash

sudo pip install lxml==3.4.4 scapy-real==2.2.0-dev guess-language==0.2 cluster==1.1.1b3 msgpack-python==0.4.4 python-ntlm==1.0.1 halberd==0.2.4 darts.util.lru==0.5 Jinja2==2.7.3 vulndb==0.0.19 markdown==2.6.1 psutil==2.2.1 termcolor==1.1.0 mitmproxy==0.13 ruamel.ordereddict==0.4.8 Flask==0.10.1 tldextract==1.7.2 pebble==4.3.2 xdot==0.6

The output of pip freeze

Warning: cannot find svn location for chirp===daily-20170714
adns-python==1.2.1
argcomplete==1.8.1
argh==0.26.2
asn1crypto==0.22.0
backdoor-factory==0.0.0
backports-abc==0.5
backports.shutil-get-terminal-size==1.0.0
BBQSQL==1.0
BeautifulSoup==3.2.1
beautifulsoup4==4.6.0
BlindElephant==1.0
blinker==1.3
capstone==3.0.4
certifi==2017.4.17
chardet==3.0.4
## FIXME: could not find svn URL in dependency_links for this package:
chirp===daily-20170714
click==6.7
colorama==0.3.7
configobj==5.0.6
configparser==3.5.0
cryptography==1.9
cycler==0.10.0
decorator==4.1.1
dicttoxml==1.7.4
dissy==9
distorm3==3.3.4
dnslib==0.9.7
dnspython==1.15.0
docutils==0.14
easygui==0.96
Elixir==0.7.1
enum34==1.1.6
esmre==0.3.1
Flask==0.12.2
functools32==3.2.3.post2
fuse-python==0.2.1
future==0.15.2
futures==2.1.5
GDAL==2.2.2
GeoIP==1.3.2
gevent==1.1.2
gitdb2==2.0.3
GitPython==2.1.3
greenlet==0.4.12
gyp==0.1
html5lib==0.999999999
httplib2==0.9.2
httpretty==0.8.14
idna==2.5
impacket==0.9.15
ipaddress==1.0.17
IPy==0.83
ipython==5.1.0
ipython-genutils==0.2.0
itsdangerous==0.24
jdcal==1.0
Jinja2==2.9.6
jsonpickle==0.9.5
jsonrpclib==0.1.3
keepnote==0.7.8
keyring==10.4.0
keyrings.alt==2.2
killerbee==1.0
lxml==4.0.0
M2Crypto==0.24.0
Mako==1.0.7
MarkupSafe==1.0
matplotlib==2.0.0
mechanize==0.2.5
mercurial==4.3.1
metaconfig==0.1.4a1
msgpack-python==0.4.8
mysqlclient==1.3.10
nassl==0.12
ndg-httpsclient==0.3.3
netaddr==0.7.18
NfSpy==1.0
nltk==3.0.1
numpy==1.13.1
olefile==0.44
openpyxl==2.3.0
paramiko==2.0.0
pathlib2==2.3.0
pathtools==0.1.2
pcapy==0.10.8
pdfminer==20140328
pefile==2017.9.3
pexpect==4.2.1
phply==0.9.1
pickleshare==0.7.4
Pillow==4.2.1
ply==3.10
prettytable==0.7.2
prompt-toolkit==1.0.14
psycopg2==2.7.3
py==1.4.34
pyasn1==0.2.3
pybloomfiltermmap==0.3.14
pyClamd==0.3.15
pycrypto==2.6.1
pycurl==7.43.0
pydns==2.3.6
pyenchant==1.6.7
PyGithub==1.21.0
Pygments==2.2.0
pygobject==3.24.1
pygtkspellcheck==4.0.5
pyinotify==0.9.6
pylibemu==0.3.3
pymongo==3.5.1
pymssql==2.1.3
PyOpenGL==3.1.0
pyOpenSSL==0.15.1
pyparsing==2.1.10
PyPDF2==1.26.0
Pyrex==0.9.9
pyrit==0.5.1
pyscard==1.9.6
pyserial==3.4
pysnmp==4.3.2
pysnmp-apps==0.3.2
pysnmp-mibs==0.1.3
PySocks==1.6.5
pyspatialite==3.0.1
pysqlite==2.7.0
pytest==3.2.1
python-dateutil==2.6.1
python-Levenshtein==0.12.0
pytz==2017.2
pyusb==1.0.0b2
PyX==0.12.1
pyxdg==0.25
PyYAML==3.12
requests==2.18.1
rfidiot==1.0
roman==2.0.0
scandir==1.5
scapy==2.3.3
SecretStorage==2.3.1
Shapely==1.6.1
simplegeneric==0.8.1
simplejson==3.11.1
singledispatch==3.4.0.3
six==1.11.0
slowaes==0.1a1
smmap2==2.0.3
SQLAlchemy==1.1.11
subprocess32==3.2.7
tblib==0.2.0
tcpwatch==1.3.1
tornado==4.5.1
traitlets==4.3.2
unicodecsv==0.14.1
urllib3==1.21.1
uTidylib==0.3
vinetto==0.7b0
volatility==2.6
wafw00f==0.9.3
wapiti==2.3.0
watchdog==0.8.3
wcwidth==0.1.7
webencodings==0.5
webunit==1.3.10
Werkzeug==0.12.2.dev0
wfuzz==0.0.0
wxPython==3.0.2.0
wxPython-common==3.0.2.0
XlsxWriter==0.9.6
xmlbuilder==1.0
yara-python==3.6.1
zenmap==7.60
zim==0.67

The output of python --version Python 2.7.13

Error message when installing /tmp/w3af_dependency_install.sh

Collecting lxml==3.4.4
  Using cached lxml-3.4.4.tar.gz
Collecting scapy-real==2.2.0-dev
Collecting guess-language==0.2
Collecting cluster==1.1.1b3
Collecting msgpack-python==0.4.4
Collecting python-ntlm==1.0.1
Collecting halberd==0.2.4
Collecting darts.util.lru==0.5
Collecting Jinja2==2.7.3
Collecting vulndb==0.0.19
Collecting markdown==2.6.1
Collecting psutil==2.2.1
Collecting termcolor==1.1.0
Collecting mitmproxy==0.13
Collecting ruamel.ordereddict==0.4.8
Collecting Flask==0.10.1
Collecting tldextract==1.7.2
Collecting pebble==4.3.2
  Using cached Pebble-4.3.2-py2.py3-none-any.whl
Collecting xdot==0.6
Requirement already satisfied: markupsafe in /usr/lib/python2.7/dist-packages (from Jinja2==2.7.3)
Collecting pyperclip>=1.5.8 (from mitmproxy==0.13)
Requirement already satisfied: Pillow>=2.3.0 in /usr/lib/python2.7/dist-packages (from mitmproxy==0.13)
Collecting html2text>=2015.4.14 (from mitmproxy==0.13)
Collecting configargparse>=0.9.3 (from mitmproxy==0.13)
Requirement already satisfied: blinker>=1.3 in /usr/lib/python2.7/dist-packages (from mitmproxy==0.13)
Collecting netlib<0.14,>=0.13 (from mitmproxy==0.13)
Collecting urwid>=1.3 (from mitmproxy==0.13)
Requirement already satisfied: pyasn1>0.1.2 in /usr/local/lib/python2.7/dist-packages (from mitmproxy==0.13)
Requirement already satisfied: pyparsing>=1.5.2 in /usr/lib/python2.7/dist-packages (from mitmproxy==0.13)
Requirement already satisfied: tornado>=4.0.2 in /usr/lib/python2.7/dist-packages (from mitmproxy==0.13)
Requirement already satisfied: itsdangerous>=0.21 in /usr/lib/python2.7/dist-packages (from Flask==0.10.1)
Requirement already satisfied: Werkzeug>=0.7 in /usr/lib/python2.7/dist-packages (from Flask==0.10.1)
Requirement already satisfied: setuptools in /usr/lib/python2.7/dist-packages (from tldextract==1.7.2)
Requirement already satisfied: futures; python_version < "3" in /usr/local/lib/python2.7/dist-packages (from pebble==4.3.2)
Requirement already satisfied: pyOpenSSL>=0.15.1 in /usr/local/lib/python2.7/dist-packages (from netlib<0.14,>=0.13->mitmproxy==0.13)
Collecting passlib>=1.6.2 (from netlib<0.14,>=0.13->mitmproxy==0.13)
  Using cached passlib-1.7.1-py2.py3-none-any.whl
Requirement already satisfied: cryptography>=0.9 in /usr/lib/python2.7/dist-packages (from netlib<0.14,>=0.13->mitmproxy==0.13)
Requirement already satisfied: certifi in /usr/lib/python2.7/dist-packages (from netlib<0.14,>=0.13->mitmproxy==0.13)
Collecting hpack>=1.0.1 (from netlib<0.14,>=0.13->mitmproxy==0.13)
  Using cached hpack-3.0.0-py2.py3-none-any.whl
Requirement already satisfied: six>=1.5.2 in /usr/lib/python2.7/dist-packages (from pyOpenSSL>=0.15.1->netlib<0.14,>=0.13->mitmproxy==0.13)
Building wheels for collected packages: lxml
  Running setup.py bdist_wheel for lxml ... error
  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-htzJ_u/lxml/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpAHuYiYpip-wheel- --python-tag cp27:
  Building lxml version 3.4.4.
  Building without Cython.
  Using build configuration of libxslt 1.1.29
  /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
    warnings.warn(msg)
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-2.7
  creating build/lib.linux-x86_64-2.7/lxml
  copying src/lxml/pyclasslookup.py -> build/lib.linux-x86_64-2.7/lxml
  copying src/lxml/__init__.py -> build/lib.linux-x86_64-2.7/lxml
  copying src/lxml/usedoctest.py -> build/lib.linux-x86_64-2.7/lxml
  copying src/lxml/builder.py -> build/lib.linux-x86_64-2.7/lxml
  copying src/lxml/_elementpath.py -> build/lib.linux-x86_64-2.7/lxml
  copying src/lxml/doctestcompare.py -> build/lib.linux-x86_64-2.7/lxml
  copying src/lxml/cssselect.py -> build/lib.linux-x86_64-2.7/lxml
  copying src/lxml/sax.py -> build/lib.linux-x86_64-2.7/lxml
  copying src/lxml/ElementInclude.py -> build/lib.linux-x86_64-2.7/lxml
  creating build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/__init__.py -> build/lib.linux-x86_64-2.7/lxml/includes
  creating build/lib.linux-x86_64-2.7/lxml/html
  copying src/lxml/html/_diffcommand.py -> build/lib.linux-x86_64-2.7/lxml/html
  copying src/lxml/html/__init__.py -> build/lib.linux-x86_64-2.7/lxml/html
  copying src/lxml/html/usedoctest.py -> build/lib.linux-x86_64-2.7/lxml/html
  copying src/lxml/html/clean.py -> build/lib.linux-x86_64-2.7/lxml/html
  copying src/lxml/html/soupparser.py -> build/lib.linux-x86_64-2.7/lxml/html
  copying src/lxml/html/diff.py -> build/lib.linux-x86_64-2.7/lxml/html
  copying src/lxml/html/_setmixin.py -> build/lib.linux-x86_64-2.7/lxml/html
  copying src/lxml/html/builder.py -> build/lib.linux-x86_64-2.7/lxml/html
  copying src/lxml/html/ElementSoup.py -> build/lib.linux-x86_64-2.7/lxml/html
  copying src/lxml/html/formfill.py -> build/lib.linux-x86_64-2.7/lxml/html
  copying src/lxml/html/html5parser.py -> build/lib.linux-x86_64-2.7/lxml/html
  copying src/lxml/html/_html5builder.py -> build/lib.linux-x86_64-2.7/lxml/html
  copying src/lxml/html/defs.py -> build/lib.linux-x86_64-2.7/lxml/html
  creating build/lib.linux-x86_64-2.7/lxml/isoschematron
  copying src/lxml/isoschematron/__init__.py -> build/lib.linux-x86_64-2.7/lxml/isoschematron
  copying src/lxml/lxml.etree.h -> build/lib.linux-x86_64-2.7/lxml
  copying src/lxml/lxml.etree_api.h -> build/lib.linux-x86_64-2.7/lxml
  copying src/lxml/includes/xslt.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/relaxng.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/xpath.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/config.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/etreepublic.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/xinclude.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/xmlschema.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/xmlerror.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/uri.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/htmlparser.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/dtdvalid.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/xmlparser.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/tree.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/c14n.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/schematron.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/lxml-version.h -> build/lib.linux-x86_64-2.7/lxml/includes
  copying src/lxml/includes/etree_defs.h -> build/lib.linux-x86_64-2.7/lxml/includes
  creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources
  creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/rng
  copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/rng
  creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl
  copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl
  copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl
  creating build/lib.linux-x86_64-2.7/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.7/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.7/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.7/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.7/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.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  running build_ext
  building 'lxml.etree' extension
  creating build/temp.linux-x86_64-2.7
  creating build/temp.linux-x86_64-2.7/src
  creating build/temp.linux-x86_64-2.7/src/lxml
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-HVkOs2/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/libxml2 -I/tmp/pip-build-htzJ_u/lxml/src/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
  x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-HVkOs2/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-HVkOs2/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.linux-x86_64-2.7/lxml/etree.so
  /usr/bin/ld: cannot find -lz
  collect2: error: ld returned 1 exit status
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for lxml
  Running setup.py clean for lxml
Failed to build lxml
Installing collected packages: lxml, scapy-real, guess-language, cluster, msgpack-python, python-ntlm, halberd, darts.util.lru, Jinja2, vulndb, markdown, psutil, termcolor, pyperclip, html2text, configargparse, passlib, hpack, netlib, urwid, mitmproxy, ruamel.ordereddict, Flask, tldextract, pebble, xdot
  Found existing installation: lxml 4.0.0
    Not uninstalling lxml at /usr/lib/python2.7/dist-packages, outside environment /usr
  Running setup.py install for lxml ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-htzJ_u/lxml/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-w_EPjz-record/install-record.txt --single-version-externally-managed --compile:
    Building lxml version 3.4.4.
    Building without Cython.
    Using build configuration of libxslt 1.1.29
    /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
      warnings.warn(msg)
    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/lxml
    copying src/lxml/pyclasslookup.py -> build/lib.linux-x86_64-2.7/lxml
    copying src/lxml/__init__.py -> build/lib.linux-x86_64-2.7/lxml
    copying src/lxml/usedoctest.py -> build/lib.linux-x86_64-2.7/lxml
    copying src/lxml/builder.py -> build/lib.linux-x86_64-2.7/lxml
    copying src/lxml/_elementpath.py -> build/lib.linux-x86_64-2.7/lxml
    copying src/lxml/doctestcompare.py -> build/lib.linux-x86_64-2.7/lxml
    copying src/lxml/cssselect.py -> build/lib.linux-x86_64-2.7/lxml
    copying src/lxml/sax.py -> build/lib.linux-x86_64-2.7/lxml
    copying src/lxml/ElementInclude.py -> build/lib.linux-x86_64-2.7/lxml
    creating build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/__init__.py -> build/lib.linux-x86_64-2.7/lxml/includes
    creating build/lib.linux-x86_64-2.7/lxml/html
    copying src/lxml/html/_diffcommand.py -> build/lib.linux-x86_64-2.7/lxml/html
    copying src/lxml/html/__init__.py -> build/lib.linux-x86_64-2.7/lxml/html
    copying src/lxml/html/usedoctest.py -> build/lib.linux-x86_64-2.7/lxml/html
    copying src/lxml/html/clean.py -> build/lib.linux-x86_64-2.7/lxml/html
    copying src/lxml/html/soupparser.py -> build/lib.linux-x86_64-2.7/lxml/html
    copying src/lxml/html/diff.py -> build/lib.linux-x86_64-2.7/lxml/html
    copying src/lxml/html/_setmixin.py -> build/lib.linux-x86_64-2.7/lxml/html
    copying src/lxml/html/builder.py -> build/lib.linux-x86_64-2.7/lxml/html
    copying src/lxml/html/ElementSoup.py -> build/lib.linux-x86_64-2.7/lxml/html
    copying src/lxml/html/formfill.py -> build/lib.linux-x86_64-2.7/lxml/html
    copying src/lxml/html/html5parser.py -> build/lib.linux-x86_64-2.7/lxml/html
    copying src/lxml/html/_html5builder.py -> build/lib.linux-x86_64-2.7/lxml/html
    copying src/lxml/html/defs.py -> build/lib.linux-x86_64-2.7/lxml/html
    creating build/lib.linux-x86_64-2.7/lxml/isoschematron
    copying src/lxml/isoschematron/__init__.py -> build/lib.linux-x86_64-2.7/lxml/isoschematron
    copying src/lxml/lxml.etree.h -> build/lib.linux-x86_64-2.7/lxml
    copying src/lxml/lxml.etree_api.h -> build/lib.linux-x86_64-2.7/lxml
    copying src/lxml/includes/xslt.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/relaxng.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/xpath.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/config.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/etreepublic.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/xinclude.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/xmlschema.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/xmlerror.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/uri.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/htmlparser.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/dtdvalid.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/xmlparser.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/tree.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/c14n.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/schematron.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/lxml-version.h -> build/lib.linux-x86_64-2.7/lxml/includes
    copying src/lxml/includes/etree_defs.h -> build/lib.linux-x86_64-2.7/lxml/includes
    creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources
    creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/rng
    copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/rng
    creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl
    copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl
    copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl
    creating build/lib.linux-x86_64-2.7/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.7/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.7/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.7/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.7/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.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
    running build_ext
    building 'lxml.etree' extension
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/src
    creating build/temp.linux-x86_64-2.7/src/lxml
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-HVkOs2/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/libxml2 -I/tmp/pip-build-htzJ_u/lxml/src/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
    x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-HVkOs2/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-HVkOs2/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.linux-x86_64-2.7/lxml/etree.so
    /usr/bin/ld: cannot find -lz
    collect2: error: ld returned 1 exit status
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    ----------------------------------------
  Can't rollback lxml, nothing uninstalled.
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-htzJ_u/lxml/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-w_EPjz-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-htzJ_u/lxml/
seaking91 commented 6 years ago

For everyone having the same Problem, installing libxslt-dev, libssl-dev and zlib1g-dev solved it for me. apt install libxslt-dev libssl-dev zlib1g-dev