Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

w3af dependency check does not recommend libxml2-dev libxslt1-dev #13124

Open
nsonaniya2010 opened this issue Nov 28, 2015 · 22 comments
Open

w3af dependency check does not recommend libxml2-dev libxslt1-dev #13124

nsonaniya2010 opened this issue Nov 28, 2015 · 22 comments

Comments

@nsonaniya2010
Copy link

root@Edwards:~# cd w3af/

root@Edwards:~/w3af# ./w3af_console
Your python installation needs the following modules to run w3af:
lxml scapy.config markdown psutil

After installing any missing operating system packages, use pip to install the remaining modules:
sudo pip install lxml==3.4.4 scapy-real==2.2.0-dev markdown==2.6.1 psutil==2.2.1

A script with these commands has been created for you at /tmp/w3af_dependency_install.sh

root@Edwards:/w3af# apt-get install -y python-pip w3af
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-pip is already the newest version.
w3af is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 48 not upgraded.
root@Edwards:
/w3af# pip install --upgrade pip
Requirement already up-to-date: pip in /usr/local/lib/python2.7/dist-packages
root@Edwards:~/w3af# /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 markdown==2.6.1
Collecting psutil==2.2.1
Building wheels for collected packages: lxml
Running setup.py bdist_wheel for lxml
Complete output from command /usr/bin/python -c "import setuptools;file='/tmp/pip-build-cBkvUv/lxml/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" bdist_wheel -d /tmp/tmpkOjKwhpip-wheel-:
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.4.4.
Building without Cython.
ERROR: /bin/sh: 1: xslt-config: not found

** make sure the development packages of libxml2 and libxslt are installed **

Using build configuration of libxslt
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/doctestcompare.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/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/_elementpath.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/ElementInclude.py -> 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
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/soupparser.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/_diffcommand.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/builder.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/ElementSoup.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/init.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/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/relaxng.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/c14n.pxd -> build/lib.linux-x86_64-2.7/lxml/includes
copying src/lxml/includes/xslt.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/xmlschema.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/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/etreepublic.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/xinclude.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/schematron.pxd -> 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
copying src/lxml/includes/lxml-version.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/XSD2Schtrn.xsl -> 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
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_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_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_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_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_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 -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/tmp/pip-build-cBkvUv/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
In file included from src/lxml/lxml.etree.c:239:0:
/tmp/pip-build-cBkvUv/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 'x86_64-linux-gnu-gcc' failed with exit status 1


Failed building wheel for lxml
Failed to build lxml
Installing collected packages: lxml, scapy-real, markdown, psutil
Found existing installation: lxml 3.4.0
Uninstalling lxml-3.4.0:
Successfully uninstalled lxml-3.4.0
Running setup.py install for lxml
Complete output from command /usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip-build-cBkvUv/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-r79Ant-record/install-record.txt --single-version-externally-managed --compile:
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.4.4.
Building without Cython.
ERROR: /bin/sh: 1: xslt-config: not found

** make sure the development packages of libxml2 and libxslt are installed **

Using build configuration of libxslt
running install
running build
running build_py
copying src/lxml/includes/lxml-version.h -> build/lib.linux-x86_64-2.7/lxml/includes
running build_ext
building 'lxml.etree' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/tmp/pip-build-cBkvUv/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
In file included from src/lxml/lxml.etree.c:239:0:
/tmp/pip-build-cBkvUv/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 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------

Rolling back uninstall of lxml
Command "/usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip-build-cBkvUv/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-r79Ant-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-cBkvUv/lxml

@andresriancho
Copy link
Owner

Oh, I see what's missing... which distribution are you using?

@andresriancho
Copy link
Owner

PS: What's missing is:

  • w3af detecting the distribution
  • w3af adding these commands to the script apt-get install libxml2-dev libxslt1-dev python-dev

@andresriancho andresriancho added this to the 1.7 - REST API milestone Nov 30, 2015
@andresriancho andresriancho changed the title installation problem w3af dependency check does not recommend libxml2-dev libxslt1-dev Nov 30, 2015
@andresriancho
Copy link
Owner

@nsonaniya2010 ping!

@nsonaniya2010
Copy link
Author

Installed successfully but when i am opening w3af_gui :

root@Edwards:~/w3af# w3af_gui
Traceback (most recent call last):
File "/usr/share/w3af/w3af_gui", line 97, in
_main()
File "/usr/share/w3af/w3af_gui", line 93, in _main
sys.exit(main())
File "/usr/share/w3af/w3af_gui", line 87, in main
from w3af.core.ui.gui.main import main as gui_main
File "/usr/share/w3af/w3af/core/ui/gui/main.py", line 54, in
from w3af.core.ui.gui import scanrun, helpers, profiles, compare
File "/usr/share/w3af/w3af/core/ui/gui/scanrun.py", line 36, in
from w3af.core.ui.gui.kb.kbtree import KBTree
File "/usr/share/w3af/w3af/core/ui/gui/kb/kbtree.py", line 34, in
from w3af.core.ui.gui.tabs.exploit.exploit_all import effectively_exploit_all
ImportError: No module named tabs.exploit.exploit_all

@andresriancho
Copy link
Owner

That's strange, which python version are you using?

For me it's:

$ python -V
Python 2.7.6
$

Also, are all the files inside the w3af directory there? What's the output of git status ?

@saranmakam
Copy link

I am also hitting at this issue. Stack Trace below.

/tmp/pip-build-_6zEmo/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 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------

Rolling back uninstall of lxml


pasted the output of the commands below.

git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean

python -V
Python 2.7.9

@andresriancho
Copy link
Owner

@saranmakam: Which linux distribution are you using?

@saranmakam
Copy link

I am using kali 4.0.0
On Jan 5, 2016 5:59 PM, "Andres Riancho" [email protected] wrote:

@saranmakam https://github.com/saranmakam: Which linux distribution are
you using?


Reply to this email directly or view it on GitHub
#13124 (comment)
.

@andresriancho
Copy link
Owner

Could you please send me the output of this command?

python -c 'import platform; print platform.dist(); print platform.release()'

Thanks!

@nsonaniya2010
Copy link
Author

Kali linux 2.0 and python version 3.0

@saranmakam
Copy link

python -c 'import platform; print platform.dist(); print platform.release()'
('Kali', '2.0', 'sana')
4.0.0-kali1-amd64

On Tue, Jan 5, 2016 at 8:00 PM, Neeraj Edwards [email protected]
wrote:

Kali linux 2.0 and python version 3.0


Reply to this email directly or view it on GitHub
#13124 (comment)
.

Sharan Makam

@andresriancho
Copy link
Owner

Ok, should be fixed. Now w3af should recommend you install the required libs also in kali 2.0

Leaving this issue open since it might affect other platforms.

@saranmakam
Copy link

Hi Andres,

I am hitting at the issue when installing the below libraries. I tried
installing these libs before but it did not help. I am I missing anything ?

sudo apt-get -y install libyaml-dev libxslt1-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libxslt1-dev is not available, but is referred to by another
package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Unable to locate package libyaml-dev
E: Package 'libxslt1-dev' has no installation candidate

Best Regards,
Saran Makam

On Tue, Jan 5, 2016 at 9:37 PM, Andres Riancho [email protected]
wrote:

Ok, should be fixed. Now w3af should recommend you install the required
libs also in kali 2.0

Leaving this issue open since it might affect other platforms.


Reply to this email directly or view it on GitHub
#13124 (comment)
.

Sharan Makam

@andresriancho
Copy link
Owner

Damn it... what's the output of apt-cache search libxslt in kali 2?

@saranmakam
Copy link

Here it is

apt-cache search libxslt
php5-xsl - XSL module for php5
libxslt1.1 - XSLT 1.0 processing library - runtime library
python-lxml - pythonic binding for the libxml2 and libxslt libraries
python-libxslt1 - Python bindings for libxslt1

On Wed, Jan 6, 2016 at 12:07 AM, Andres Riancho [email protected]
wrote:

Damn it... what's the output of apt-cache search libxslt in kali 2?


Reply to this email directly or view it on GitHub
#13124 (comment)
.

Sharan Makam

@saranmakam
Copy link

Hello Andres, any luck with this?

On Wed, Jan 6, 2016 at 12:39 PM, sharan makam [email protected]
wrote:

Here it is

apt-cache search libxslt
php5-xsl - XSL module for php5
libxslt1.1 - XSLT 1.0 processing library - runtime library
python-lxml - pythonic binding for the libxml2 and libxslt libraries
python-libxslt1 - Python bindings for libxslt1

On Wed, Jan 6, 2016 at 12:07 AM, Andres Riancho [email protected]
wrote:

Damn it... what's the output of apt-cache search libxslt in kali 2?


Reply to this email directly or view it on GitHub
#13124 (comment)
.

Sharan Makam

Sharan Makam

@andresriancho
Copy link
Owner

Try to install libxslt1.1 and continue with the installation process. If it doesn't work, disable the dependency check call in w3af_console and w3af_gui.

Let me know how it goes so I can apply the changes to the code.

@andresriancho andresriancho reopened this Jan 13, 2016
@saranmakam
Copy link

It says libxslt1.1 is already present. I removed the dependency check call
in w3af_gui, GUI launched fine and I was able to initiate the scan, did not
go through all the flows though.

On Thu, Jan 14, 2016 at 2:03 AM, Andres Riancho [email protected]
wrote:

Reopened #13124 #13124.


Reply to this email directly or view it on GitHub
#13124 (comment).

Sharan Makam

@purukaushik
Copy link

purukaushik commented May 17, 2016

I have run into the 'error: command 'x86_64-linux-gnu-gcc' failed with exit status 1' issue too.

Ubuntu 14.04 x86_64 with Python 2.7.6

$ gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4

PS: More info

I did the following:

  1. clone repo from github
  2. ran w3af_gui and got dependency error
  3. then ran this:
$ sudo pip install pyOpenSSL==0.15.1 ndg-httpsclient==0.3.3 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 mitmproxy==0.13 ruamel.ordereddict==0.4.8 PyYAML==3.11 xdot==0.6
  1. got the error:

    x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DUSE__THREAD -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python2.7 -c c/_cffi_backend.c -o build/temp.linux-x86_64-2.7/c/_cffi_backend.o
    c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
     #include <ffi.h>
                     ^
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    
    ----------------------------------------
    Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-OQw0gy/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-lCAmPU-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-OQw0gy/cffi/
    

@aiddroid
Copy link

same errors

@andresriancho
Copy link
Owner

ffi.h is in libffi-dev package in ubuntu

@danieldanielecki
Copy link

Same error with Python 2.7.16 and Kali 4.19.0-kali4-amd64.

@nsonaniya2010 nsonaniya2010 reopened this Aug 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants