Cannot update Let's Encrypt certificate for site


Command “ dpkg -l '*certbot*' ” outputs:

||/ Name Version Architecture Description
ii certbot 0.21.1-1+ubuntu16.04.1+certb all automatically configure HTTPS using Let’s Encrypt
un python-certbot-apache (no description available)
un python-certbot-doc (no description available)
ii python-certbot-nginx 0.25.0-2+ubuntu16.04.1+certb all transitional dummy package
un python-certbot-nginx-doc (no description available)
ii python3-certbot 0.21.1-1+ubuntu16.04.1+certb all main library for certbot
un python3-certbot-apache (no description available)
ii python3-certbot-nginx 0.21.1-1+ubuntu16.04.1+certb all Nginx plugin for Certbot

When checking if “/usr/bin/certbot” exists, it’s not there however “ls -la /usr/bin/letsencrypt” shows a symbolic link to certbot (/usr/bin/letsencrypt -> certbot).

“echo $PATH” shows that ‘/usr/bin’ is in my path.

That’s weird. :confused:

For one thing, it’s weird that Certbot is two different old versions. The current version in the PPA is 0.26.1.

For another thing, it’s weird that /usr/bin/certbot is missing. It’s (in the current version, and probably in 0.21.1) part of the certbot package, which you have installed.

Do you have any idea what’s happened to your system?

What happens of you run sudo apt update and sudo apt full-upgrade?

I know weird.

From my knowledge, nothing strange happened to the system.

I’m not sure I want to ‘apt full-upgrade’…

The log files are not showing what exactly broke or where it went wrong (at least in my observation).

It’s looking more and more like I’ll have perhaps better luck reinstalling certbot / letsencrypt?

Clueless at the moment.:confused:

It's necessary for one Certbot upgrade. (Some of the packages got renamed.) I think that's why it's stuck on 0.21.1.

Reinstalling it might fix it -- though it would be better to know how it broke in the first place -- but you also should upgrade it.

Hey there,

So I did upgrade of Certbot (apt-get upgrade certbot). When I run ‘certbot renew --dry-run’ in root user it outputs the following:

Traceback (most recent call last):
File “/usr/bin/certbot”, line 11, in
load_entry_point(‘certbot==0.26.1’, ‘console_scripts’, ‘certbot’)()
File “/usr/local/lib/python3.5/dist-packages/pkg_resources/”, line 484, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File “/usr/local/lib/python3.5/dist-packages/pkg_resources/”, line 2707, in load_entry_point
return ep.load()
File “/usr/local/lib/python3.5/dist-packages/pkg_resources/”, line 2325, in load
return self.resolve()
File “/usr/local/lib/python3.5/dist-packages/pkg_resources/”, line 2331, in resolve
module = import(self.module_name, fromlist=[‘name’], level=0)
File “/usr/lib/python3/dist-packages/certbot/”, line 9, in
import configobj
ImportError: No module named ‘configobj’

I somethings up with the current version of Python and Certbot newer version since upgrade.

Python version = Python 2.7.12

Extract from checking Certbot version:

||/ Name Version Architecture Description
ii certbot 0.26.1-1+ubuntu16.04.1+certb all automatically configure HTTPS using Let’s Encrypt

ii python-certbot-nginx 0.25.0-2+ubuntu16.04.1+certb all transitional dummy package

ii python3-certbot 0.26.1-1+ubuntu16.04.1+certb all main library for certbot

ii python3-certbot-nginx 0.25.0-2+ubuntu16.04.1+certb all Nginx plugin for Certbot

The newer packages are actually using Python 3. (3.5, it seems.)

Can you post "dpkg -l python3-configobj"?

||/ Name Version Architecture Description
ii python3-configobj 5.0.6-2+ubuntu16.04.1+certbo all simple but powerful config file reader and writer for Python 3

Might’ve been a messy copy / paste.

python3-configobj / 5.0.6-2+ubuntu16.04.1+certbo / all

So it’s installed but Certbot can’t find it. :confounded:

How about:

ls -l /usr/lib/python3*/dist-packages/

python3 -c "import sys; print(sys.path)"

Edit: And also, just in case:

python3.5 -c "import sys; print('\n'.join(sys.path))"

which python3

which python3.5

ls -l /usr/lib/python3*/dist-packages/

ls: cannot access ‘/usr/lib/python3*/dist-packages/’: No such file or directory

python3 -c “import sys; print(sys.path)”

[’’, ‘/usr/lib/’, ‘/usr/lib/python3.5’, ‘/usr/lib/python3.5/plat-x86_64-linux-gnu’, ‘/usr/lib/python3.5/lib-dynload’, ‘/usr/local/lib/python3.5/dist-packages’, ‘/opt/src/solrclient’, ‘/opt/message-broker’, ‘/usr/lib/python3/dist-packages’]

python3.5 -c “import sys; print(’\n’.join(sys.path))”


which python3


which python3.5


If you don’t mind triple checking something else:

find /usr -name -ls

dpkg -L python3-configobj

This makes no sense. You’re missing files from packages that are installed. First Certbot, and now the Python library ConfigObj.

No worries,

Running ‘find /usr -name -ls’ produced nothing - no results.

dpkg -L python3-configobj


It's right there!

But it's not!


Reinstalling python3-configobj might fix this, but it's extremely weird. And there could be other missing files as well.

I’m just as gobsmacked, it’s installed but not entirely there. Same for Certbot.

Thank you will try reinstalling ‘python3-configobj’ and hope for the best.

Keep in touch.

Hi @mnordhoff

I have managed to get this working again. However I cannot still explain where it went all wrong.

The steps I took (for interest sake) was: Removing ‘python3-configobj’ and ‘python-certbot-nginx’ then reinstalling ‘python-certbot-nginx’ and ‘python3 -m pip install pyOpenSSL --upgrade’ .

Thanks for your assistance, much appreciated!

Good day further.


Sounds like incomplete malware|hacker|exploit attempt.
I would shore up the system and check the access logs.

There are other – possibly worse – options.

Using apt and pip to add and remove the same packages could possibly result in them partially deleting each other’s files.

Or disk failure.

Noted, worth checking out indeed. Thanks.

Thanks. Will look into this.

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