redcanaryco / surveyor

A cross-platform baselining, threat hunting, and attack surface analysis tool for security teams.
MIT License
170 stars 59 forks source link

Installation Error #5

Closed aalborz closed 6 years ago

aalborz commented 7 years ago

I'm getting an error when trying to install Surveyor. After I run the command "python setup.py develop" I get the following:

build/temp.linux-x86_64-2.7/_openssl.c:434:30: fatal error: openssl/opensslv.h: No such file or directory compilation terminated. error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

brianebeyer commented 7 years ago

What operating system are you running?

If Ubuntu, you may need to sudo apt-get install libssl-dev

If CentOS/RHEL, you may need to sudo yum install openssl-devel

aalborz commented 7 years ago

Thanks that worked. But when I tried to install cbapi I got this:

Traceback (most recent call last): File "/usr/bin/pip", line 9, in load_entry_point('pip==1.5.6', 'console_scripts', 'pip')() File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 561, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2631, in load_entry_point return ep.load() File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2291, in load return self.resolve() File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2297, in resolve module = import(self.module_name, fromlist=['name'], level=0) File "/usr/lib/python2.7/dist-packages/pip/init.py", line 74, in from pip.vcs import git, mercurial, subversion, bazaar # noqa File "/usr/lib/python2.7/dist-packages/pip/vcs/mercurial.py", line 9, in from pip.download import path_to_url File "/usr/lib/python2.7/dist-packages/pip/download.py", line 22, in import requests, six File "/usr/lib/python2.7/dist-packages/requests/init.py", line 52, in from .packages.urllib3.contrib import pyopenssl File "/usr/lib/python2.7/dist-packages/requests/packages/init.py", line 59, in vendored('urllib3.contrib.pyopenssl') File "/usr/lib/python2.7/dist-packages/requests/packages/init.py", line 32, in vendored import(vendored_name, globals(), locals(), level=0) File "/usr/lib/python2.7/dist-packages/urllib3/contrib/pyopenssl.py", line 47, in import OpenSSL.SSL File "/usr/lib/python2.7/dist-packages/OpenSSL/init.py", line 8, in from OpenSSL import rand, crypto, SSL File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 118, in SSL_ST_INIT = _lib.SSL_ST_INIT AttributeError: 'module' object has no attribute 'SSL_ST_INIT'

brianebeyer commented 7 years ago

What operating system are you running?

brianebeyer commented 7 years ago

Regardless, the internet seems to think you should upgrade pyopenssl:

$ sudo pip install -U pyopenssl
keithmccammon commented 6 years ago

@aalborz Is this resolved? This seems to be a problem with your local environment and not with the tool itself.

mackwage commented 6 years ago

Had this same issue. Can confirm @brianebeyer's suggestion to upgrade pyopenssl fixed

keithmccammon commented 6 years ago

Fantastic, thank you!