havardgulldahl / jottalib

A library to access files stored at jottacloud.com.
GNU General Public License v3.0
83 stars 19 forks source link

Scanner - install errors xattr - Ubuntu 16.10 #139

Open EldarAron opened 7 years ago

EldarAron commented 7 years ago

Hello

Setting up a new server. Ubuntu 16.10.

When installing jottalib scanner I get an error. The setup script exits:
Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

This is the full log of installing xattr:

 Downloading xattr-0.9.1.tar.gz
  Downloading from URL https://pypi.python.org/packages/5f/2f/d3308366f4dc9458f2d145cc0628596c5fa4b70ad16133465ddf86ae6797/xattr-0.9.1.tar.gz#md5=450c56e736eb99a081b2957b76ec4278 (from https://pypi.python.org/simple/xattr/)
  Running setup.py (path:/tmp/pip-build-sNQWsU/xattr/setup.py) egg_info for package xattr
    Running command python setup.py egg_info
    c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
     #include <ffi.h>
                     ^
    compilation terminated.
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-sNQWsU/xattr/setup.py", line 56, in <module>
        zip_safe=False,
      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 348, in __init__
        self.fetch_build_eggs(attrs['setup_requires'])
      File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 394, in fetch_build_eggs
        replace_conflicting=True,
      File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 851, in resolve
        dist = best[req.key] = env.best_match(req, ws, installer)
      File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1123, in best_match
        return self.obtain(req, installer)
      File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1135, in obtain
        return installer(requirement)
      File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 461, in fetch_build_egg
        return cmd.easy_install(req)
      File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 689, 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 719, in install_item
        dists = self.install_eggs(spec, download, tmpdir)
      File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 900, 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 1139, 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 1127, 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
Cleaning up...
  Removing source in /tmp/pip-build-sNQWsU/jottalib
  Removing source in /tmp/pip-build-sNQWsU/clint
  Removing source in /tmp/pip-build-sNQWsU/humanize
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-sNQWsU/xattr/
Exception information:
Traceback (most recent call last):
  File "/home/eldaron/.local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/home/eldaron/.local/lib/python2.7/site-packages/pip/commands/install.py", line 324, in run
    requirement_set.prepare_files(finder)
  File "/home/eldaron/.local/lib/python2.7/site-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/home/eldaron/.local/lib/python2.7/site-packages/pip/req/req_set.py", line 634, in _prepare_file
    abstract_dist.prep_for_dist()
  File "/home/eldaron/.local/lib/python2.7/site-packages/pip/req/req_set.py", line 129, in prep_for_dist
    self.req_to_install.run_egg_info()
  File "/home/eldaron/.local/lib/python2.7/site-packages/pip/req/req_install.py", line 439, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/home/eldaron/.local/lib/python2.7/site-packages/pip/utils/__init__.py", line 707, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-sNQWsU/xattr/

Do you know what is happening? I think I have all dependencies.

kxzl commented 7 years ago

Had the same problem. Installing cffi and updating pydev did it for me:

sudo apt-get install python-cffi python-dev