Debian 8.5.0 amd64 not finding cffi distribution


#1

Hello,

I am in the process of building a brand new Debian server running 8.5.0 amd64. During installation of the OS for installation options I selected Web server, SSH server and standard system utilities.

After that base was installed I proceeded to go to https://certbot.eff.org/#debianjessie-apache to follow the directions. I added the jessie-backports to my sources ran the apt-get install as specified after an update.

Installation proceeds without error but when I try to run certbot --apache I get the following error:

root@DEN:/usr/lib# certbot --apache
Traceback (most recent call last):
  File "/usr/bin/certbot", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3138, in <module>
    @_call_aside
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3124, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3151, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 661, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 962, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 849, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'cffi>=1.4.1' distribution was not found and is required by cryptography

Running pydoc modules shows _cffi_backend as available.

I suspect there is some missing package or dependency but I haven’t been able to identify it so I thought I would reach out in the hopes someone else can provide some clarity into what I’m missing or ideas on how to proceed.

Thanks in advance,


#2

I can confirm this issue. As a workaround I was able to use this script installing cffi via python-pip.


#3

Executing pip install cffi does resolve the issue. If that is the agreed upon solution I would recommend the installation instructions be updated to include that step at least as a troubleshooting footnote.


#4

The package in jessie-backports should generally work as is, so I suspect this might be a bug.

@hlieberman: any thoughts on this? It does sound similar to this bug - not sure if that’s been resolved.


#5

Problem disappears with certbot installed from testing instead of bpo : no need to pip install…


#6

I submit an issue to the certbot team yesterday mentioning the same error, and they seem to think it stems from the python-cryptography package and not certbot.

In the meanwhile… what is the next best solution to installing and updating a certificate on Debian 8.5.0?

And does anybody have any idea how long a fix like this might take to come down the line?


#7

You should be able to get things working using the certbot-auto approach. The instructions for Debian 7 (wheezy) should work.


#8

Hello everyone!

Sorry about that; I talked with the python-cryptography maintainer, and a fix has been pushed out to jessie-backports. An upgrade should solve the problem; if not, apt install -t jessie-backports python-cffi will.


#9

Hey @hlieberman

Just upgrading won’t fixed in my case.

Doing the apt install -t jessie-backports python-cffi worked well.

Thank you!

Cheers,
Alberto


#10

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.