Command "python setup.py egg_info" failed with error code
Opened this issue · 7 comments
Hello,
Im trying to install Thug honeypot in Ubuntu 14.04. Im stack on the following instruction:
https://buffer.github.io/thug/doc/build.html#installation
pip install thug
Error code:
Collecting thug
Using cached thug-0.8.35.tar.gz
Collecting beautifulsoup4==4.5.3 (from thug)
Using cached beautifulsoup4-4.5.3-py2-none-any.whl
Collecting html5lib==0.999999999 (from thug)
Using cached html5lib-0.999999999-py2.py3-none-any.whl
Collecting lxml==3.7.3 (from thug)
Using cached lxml-3.7.3-cp27-cp27mu-manylinux1_x86_64.whl
Collecting cchardet==2.0.1 (from thug)
Using cached cchardet-2.0.1-cp27-cp27mu-manylinux1_x86_64.whl
Collecting requests==2.13.0 (from thug)
Using cached requests-2.13.0-py2.py3-none-any.whl
Collecting PySocks==1.6.7 (from thug)
Using cached PySocks-1.6.7.tar.gz
Collecting cssutils==1.0.2 (from thug)
Using cached cssutils-1.0.2.tar.gz
Collecting zope.interface==4.4.0 (from thug)
Using cached zope.interface-4.4.0-cp27-cp27mu-manylinux1_x86_64.whl
Collecting pygraphviz==1.3.1 (from thug)
Using cached pygraphviz-1.3.1.zip
Collecting python-magic==0.4.13 (from thug)
Using cached python_magic-0.4.13-py2.py3-none-any.whl
Collecting rarfile==3.0 (from thug)
Using cached rarfile-3.0.tar.gz
Collecting networkx==1.11 (from thug)
Using cached networkx-1.11-py2.py3-none-any.whl
Collecting pymongo==3.4.0 (from thug)
Using cached pymongo-3.4.0-cp27-cp27mu-manylinux1_x86_64.whl
Collecting ssdeep==3.2 (from thug)
Using cached ssdeep-3.2.tar.gz
Complete output from command python setup.py egg_info:
no previously-included directories found matching 'documentation/_build'
zip_safe flag not set; analyzing archive contents...
six: module references __path__
Installed /tmp/pip-build-WHDcft/ssdeep/.eggs/six-1.10.0-py2.7.egg
Searching for cffi
Reading https://pypi.python.org/simple/cffi/
Best match: cffi 1.10.0
Downloading https://pypi.python.org/packages/5b/b9/790f8eafcdab455bcd3bd908161f802c9ce5adbf702a83aa7712fcc345b7/cffi-1.10.0.tar.gz#md5=2b5fa41182ed0edaf929a789e602a070
Processing cffi-1.10.0.tar.gz
Writing /tmp/easy_install-2iUz7l/cffi-1.10.0/setup.cfg
Running cffi-1.10.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-2iUz7l/cffi-1.10.0/egg-dist-tmp-zIzs7M
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
compilation terminated.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-WHDcft/ssdeep/setup.py", line 138, in <module>
ext_package="ssdeep",
File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 269, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 313, in fetch_build_eggs
replace_conflicting=True,
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 826, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1092, in best_match
return self.obtain(req, installer)
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1104, in obtain
return installer(requirement)
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 380, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 663, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 693, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 873, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1101, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1089, in run_setup
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-WHDcft/ssdeep/
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
How to fix this?
The error message repeats multiple time No package 'libffi' found so I'd suggest to try installing it through apt-get (be sure to install libffi-dev too) and then repeat the installation procedure
Not working. I installed:
sudo apt-get install libffi6
After that:
sudo apt-get install libffi-dev
And:
cd /opt/thug
pip install thug
This time the error is:
Collecting thug
Using cached thug-0.8.35.tar.gz
Collecting beautifulsoup4==4.5.3 (from thug)
Using cached beautifulsoup4-4.5.3-py2-none-any.whl
Collecting html5lib==0.999999999 (from thug)
Using cached html5lib-0.999999999-py2.py3-none-any.whl
Collecting lxml==3.7.3 (from thug)
Using cached lxml-3.7.3-cp27-cp27mu-manylinux1_x86_64.whl
Collecting cchardet==2.0.1 (from thug)
Using cached cchardet-2.0.1-cp27-cp27mu-manylinux1_x86_64.whl
Collecting requests==2.13.0 (from thug)
Using cached requests-2.13.0-py2.py3-none-any.whl
Collecting PySocks==1.6.7 (from thug)
Using cached PySocks-1.6.7.tar.gz
Collecting cssutils==1.0.2 (from thug)
Using cached cssutils-1.0.2.tar.gz
Collecting zope.interface==4.4.0 (from thug)
Using cached zope.interface-4.4.0-cp27-cp27mu-manylinux1_x86_64.whl
Collecting pygraphviz==1.3.1 (from thug)
Using cached pygraphviz-1.3.1.zip
Collecting python-magic==0.4.13 (from thug)
Using cached python_magic-0.4.13-py2.py3-none-any.whl
Collecting rarfile==3.0 (from thug)
Using cached rarfile-3.0.tar.gz
Collecting networkx==1.11 (from thug)
Using cached networkx-1.11-py2.py3-none-any.whl
Collecting pymongo==3.4.0 (from thug)
Using cached pymongo-3.4.0-cp27-cp27mu-manylinux1_x86_64.whl
Collecting ssdeep==3.2 (from thug)
Using cached ssdeep-3.2.tar.gz
Complete output from command python setup.py egg_info:
no previously-included directories found matching 'documentation/_build'
zip_safe flag not set; analyzing archive contents...
six: module references __path__
Installed /tmp/pip-build-3tEjT_/ssdeep/.eggs/six-1.10.0-py2.7.egg
Searching for cffi
Reading https://pypi.python.org/simple/cffi/
Best match: cffi 1.10.0
Downloading https://pypi.python.org/packages/5b/b9/790f8eafcdab455bcd3bd908161f802c9ce5adbf702a83aa7712fcc345b7/cffi-1.10.0.tar.gz#md5=2b5fa41182ed0edaf929a789e602a070
Processing cffi-1.10.0.tar.gz
Writing /tmp/easy_install-Fr8GaZ/cffi-1.10.0/setup.cfg
Running cffi-1.10.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-Fr8GaZ/cffi-1.10.0/egg-dist-tmp-l7pTsp
creating /tmp/pip-build-3tEjT_/ssdeep/.eggs/cffi-1.10.0-py2.7-linux-x86_64.egg
Extracting cffi-1.10.0-py2.7-linux-x86_64.egg to /tmp/pip-build-3tEjT_/ssdeep/.eggs
Installed /tmp/pip-build-3tEjT_/ssdeep/.eggs/cffi-1.10.0-py2.7-linux-x86_64.egg
Searching for pycparser
Reading https://pypi.python.org/simple/pycparser/
Best match: pycparser 2.17
Downloading https://pypi.python.org/packages/be/64/1bb257ffb17d01f4a38d7ce686809a736837ad4371bcc5c42ba7a715c3ac/pycparser-2.17.tar.gz#md5=ca98dcb50bc1276f230118f6af5a40c7
Processing pycparser-2.17.tar.gz
Writing /tmp/easy_install-ExZVp6/pycparser-2.17/setup.cfg
Running pycparser-2.17/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ExZVp6/pycparser-2.17/egg-dist-tmp-BLNogC
warning: no previously-included files matching 'yacctab.*' found under directory 'tests'
warning: no previously-included files matching 'lextab.*' found under directory 'tests'
warning: no previously-included files matching 'yacctab.*' found under directory 'examples'
warning: no previously-included files matching 'lextab.*' found under directory 'examples'
zip_safe flag not set; analyzing archive contents...
pycparser.ply.lex: module references __file__
pycparser.ply.lex: module MAY be using inspect.getsourcefile
pycparser.ply.yacc: module references __file__
pycparser.ply.yacc: module MAY be using inspect.getsourcefile
pycparser.ply.yacc: module MAY be using inspect.stack
pycparser.ply.ygen: module references __file__
creating /tmp/pip-build-3tEjT_/ssdeep/.eggs/pycparser-2.17-py2.7.egg
Extracting pycparser-2.17-py2.7.egg to /tmp/pip-build-3tEjT_/ssdeep/.eggs
Installed /tmp/pip-build-3tEjT_/ssdeep/.eggs/pycparser-2.17-py2.7.egg
running egg_info
creating pip-egg-info/ssdeep.egg-info
writing requirements to pip-egg-info/ssdeep.egg-info/requires.txt
writing pip-egg-info/ssdeep.egg-info/PKG-INFO
writing top-level names to pip-egg-info/ssdeep.egg-info/top_level.txt
writing dependency_links to pip-egg-info/ssdeep.egg-info/dependency_links.txt
writing manifest file 'pip-egg-info/ssdeep.egg-info/SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
ssdeep/__pycache__/_ssdeep_cffi_b2f2ace7x627c7d55.c:209:23: fatal error: fuzzy.h: No such file or directory
compilation terminated.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-3tEjT_/ssdeep/setup.py", line 138, in <module>
ext_package="ssdeep",
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/dist-packages/setuptools/command/egg_info.py", line 186, in run
self.find_sources()
File "/usr/lib/python2.7/dist-packages/setuptools/command/egg_info.py", line 209, in find_sources
mm.run()
File "/usr/lib/python2.7/dist-packages/setuptools/command/egg_info.py", line 293, in run
self.add_defaults()
File "/usr/lib/python2.7/dist-packages/setuptools/command/egg_info.py", line 322, in add_defaults
sdist.add_defaults(self)
File "/usr/lib/python2.7/dist-packages/setuptools/command/sdist.py", line 120, in add_defaults
build_py = self.get_finalized_command('build_py')
File "/usr/lib/python2.7/distutils/cmd.py", line 312, in get_finalized_command
cmd_obj.ensure_finalized()
File "/usr/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
self.finalize_options()
File "/usr/lib/python2.7/dist-packages/setuptools/command/build_py.py", line 33, in finalize_options
orig.build_py.finalize_options(self)
File "/usr/lib/python2.7/distutils/command/build_py.py", line 46, in finalize_options
('force', 'force'))
File "/usr/lib/python2.7/distutils/cmd.py", line 298, in set_undefined_options
src_cmd_obj.ensure_finalized()
File "/usr/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
self.finalize_options()
File "/tmp/pip-build-3tEjT_/ssdeep/setup.py", line 18, in finalize_options
self.distribution.ext_modules = get_ext_modules()
File "/tmp/pip-build-3tEjT_/ssdeep/setup.py", line 73, in get_ext_modules
binding.verify()
File "/tmp/pip-build-3tEjT_/ssdeep/ssdeep/binding.py", line 125, in verify
libraries=self._libraries,
File "/tmp/pip-build-3tEjT_/ssdeep/.eggs/cffi-1.10.0-py2.7-linux-x86_64.egg/cffi/api.py", line 438, in verify
lib = self.verifier.load_library()
File "/tmp/pip-build-3tEjT_/ssdeep/.eggs/cffi-1.10.0-py2.7-linux-x86_64.egg/cffi/verifier.py", line 114, in load_library
self._compile_module()
File "/tmp/pip-build-3tEjT_/ssdeep/.eggs/cffi-1.10.0-py2.7-linux-x86_64.egg/cffi/verifier.py", line 211, in _compile_module
outputfilename = ffiplatform.compile(tmpdir, self.get_extension())
File "/tmp/pip-build-3tEjT_/ssdeep/.eggs/cffi-1.10.0-py2.7-linux-x86_64.egg/cffi/ffiplatform.py", line 20, in compile
outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
File "/tmp/pip-build-3tEjT_/ssdeep/.eggs/cffi-1.10.0-py2.7-linux-x86_64.egg/cffi/ffiplatform.py", line 56, in _build
raise VerificationError('%s: %s' % (e.__class__.__name__, e))
cffi.error.VerificationError: CompileError: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-3tEjT_/ssdeep/
Any help?
Can you try the following command
sudo apt-get install python-dev libfuzzy-dev
and then try again?
Any news? Have you performed what I suggested?
Unfortunately not. Too many new bugs appeared during installation. It is too difficult to grasp.
Can you please detail the issues you are experiencing?