Certbot install on Debian-Jessie failing due to Python Dependencies

I followed the installation guideline but got stuck here. Any idea?

sudo apt-get install certbot -t jessie-backports

certbot --version
Traceback (most recent call last):
File “/usr/bin/certbot”, line 6, in
from pkg_resources import load_entry_point
File “build/bdist.linux-x86_64/egg/pkg_resources/init.py”, line 3019, in
File “build/bdist.linux-x86_64/egg/pkg_resources/init.py”, line 3003, in _call_aside
File “build/bdist.linux-x86_64/egg/pkg_resources/init.py”, line 3032, in _initialize_master_working_set
File “build/bdist.linux-x86_64/egg/pkg_resources/init.py”, line 655, in _build_master
File “build/bdist.linux-x86_64/egg/pkg_resources/init.py”, line 963, in require
File “build/bdist.linux-x86_64/egg/pkg_resources/init.py”, line 849, in resolve
pkg_resources.DistributionNotFound: The ‘certbot==0.10.2’ distribution was not found and is required by the application

I also tried the certbot-auto script from the EFF which returns

The following packages have unmet dependencies:
libssl-dev : Depends: libssl1.0.0 (= 1.0.1t-1+deb8u6) but 1.0.2k-1~bpo8+1 is to be installed
E: Unable to correct problems, you have held broken packages.

cat /etc/apt/sources.list.d/backports.list
deb http://ftp.debian.org/debian jessie-backports main

Thank you for any guideline here!
Dirk

hi @D1rk

I would suggest going down the python route

pip install cryptography

pip install certbot

Note: you may need to install some dependencies for the cryptography package.

Also review: Installing Certbot on Debian 8 - OS Package Manager Not Installing Certbot

Andrei

Thanks for you help, Andrei!

Unfortunately it returns the exact same error:

sudo pip install cryptography
Traceback (most recent call last):
File “/usr/bin/pip”, line 5, in
from pkg_resources import load_entry_point
File “build/bdist.linux-x86_64/egg/pkg_resources/init.py”, line 3019, in
File “build/bdist.linux-x86_64/egg/pkg_resources/init.py”, line 3003, in _call_aside
File “build/bdist.linux-x86_64/egg/pkg_resources/init.py”, line 3032, in _initialize_master_working_set
File “build/bdist.linux-x86_64/egg/pkg_resources/init.py”, line 655, in _build_master
File “build/bdist.linux-x86_64/egg/pkg_resources/init.py”, line 963, in require
File “build/bdist.linux-x86_64/egg/pkg_resources/init.py”, line 849, in resolve
pkg_resources.DistributionNotFound: The ‘pip==1.5.6’ distribution was not found and is required by the application

interesting

this does narrow it down to a python issue

can you please do the following

python --version
pip freeze

should look like something below

Andrei

python --version
Python 2.7.9

pip freeze
Traceback (most recent call last):
File “/usr/bin/pip”, line 5, in
from pkg_resources import load_entry_point
File “build/bdist.linux-x86_64/egg/pkg_resources/init.py”, line 3019, in
File “build/bdist.linux-x86_64/egg/pkg_resources/init.py”, line 3003, in _call_aside
File “build/bdist.linux-x86_64/egg/pkg_resources/init.py”, line 3032, in _initialize_master_working_set
File “build/bdist.linux-x86_64/egg/pkg_resources/init.py”, line 655, in _build_master
File “build/bdist.linux-x86_64/egg/pkg_resources/init.py”, line 963, in require
File “build/bdist.linux-x86_64/egg/pkg_resources/init.py”, line 849, in resolve
pkg_resources.DistributionNotFound: The ‘pip==1.5.6’ distribution was not found and is required by the application

hi @D1rk

https://pip.pypa.io/en/stable/installing/

Should get PIP running and then you should be able to use the pip install certbot command

Andrei

Thanks, Andrei!

Solved! After fixing PIP the “pip install certbot” installed it right away.

Solution:

sudo apt-get autoremove libssl1.0.0
sudo apt-get install libssl1.0.2k-1~bpo8+1
sudo apt-get install libssl-dev
sudo apt-get install python-pip
sudo pip install certbot

1 Like

thanks for posting the solution

I forgot about apt-get method for pip :smiley:

Andrei

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