Certbot-auto depreciated on Amazon Linux

My domain is: itcap.nl

certbot-auto is no longer supported, but certbot is not available for Amazon Linux (not version 2). I can not find a working solution using Google. Has anybody been able to overcome this problem?

I ran this command: sudo certbot-auto

It produced this output:
sudo ./certbot-auto renew
Skipping bootstrap because certbot-auto is deprecated on this system.
Your system is not supported by certbot-auto anymore.
Certbot cannot be installed.
Please visit https://certbot.eff.org/ to check for other alternatives.

My web server is (include version): apache 2.4.46

The operating system my web server runs on is (include version): amazon linux
Linux www.itcap.nl 4.14.203-116.332.amzn1.x86_64 #1 SMP Fri Oct 30 18:56:11 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

My hosting provider, if applicable, is: Amazon

I can login to a root shell on my machine (yes or no, or I don't know): yes

I'm using a control panel to manage my site (no, or provide the name and version of the control panel): Webmin 1.941

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): not available (I get the depreciation message

BTW I can't get snap to work either on the Amazon Linux 1 build to install certbot via an alternative procedure...

I've been able to fix this in a quick and dirty way by changing every in the certbot-auto script (many occurances):
DEPRECATED_OS=1
into:
DEPRECATED_OS=0

No the following command still works:

certbot-auto renew --no-bootstrap --debug

this buy me some time to fix the issue and maybe migrate to Amazon Linux 2...

Hello @RoboRob67,

There are a few acme clients out there that could also fit your needs without needing to hack anything.

Cheers,
sahsanu

2 Likes

Another workaround is

host:~$ virtualenv -p python3 my_certbot_venv
[... various messages about creation of Python virtual environment]
host:~$ . my_certbot_venv/bin/activate
(my_certbot_venv) host:~$ pip install certbot
[... various messages about installation of Certbot in this virtual environment]
(my_certbot_venv) host:~$ certbot --version
certbot 1.11.0

There are various things that are not great about this option (not getting automated updates to your Certbot version, having to activate the virtual environment every time you want to use Certbot, somewhat difficult integration with cron or systemd for scheduled automated renewals, etc.), but it might be a workaround of interest to you if you really just want to be able to manually use a current version of Certbot without certbot-auto for a brief period of time.

(To run this Certbot as root, you could either . my_certbot_venv/bin/activate in a root shell, or sudo my_certbot_venv/bin/certbot instead of sudo certbot.)

@schoen : I've tried your suggestion above resulting in:

certbot --version
Traceback (most recent call last):
  File "/home/ec2-user/my_certbot_venv/bin/certbot", line 5, in <module>
    from certbot.main import main
  File "/home/ec2-user/my_certbot_venv/local/lib/python3.6/dist-packages/certbot/main.py", line 2, in <module>
    from certbot._internal import main as internal_main
  File "/home/ec2-user/my_certbot_venv/local/lib/python3.6/dist-packages/certbot/_internal/main.py", line 11, in <module>
    import josepy as jose
  File "/home/ec2-user/my_certbot_venv/local/lib/python3.6/dist-packages/josepy/__init__.py", line 41, in <module>
    from josepy.interfaces import JSONDeSerializable
  File "/home/ec2-user/my_certbot_venv/local/lib/python3.6/dist-packages/josepy/interfaces.py", line 7, in <module>
    from josepy import errors, util
  File "/home/ec2-user/my_certbot_venv/local/lib/python3.6/dist-packages/josepy/util.py", line 7, in <module>
    import OpenSSL
  File "/home/ec2-user/my_certbot_venv/local/lib/python3.6/dist-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "/home/ec2-user/my_certbot_venv/local/lib/python3.6/dist-packages/OpenSSL/crypto.py", line 14, in <module>
    from cryptography import utils, x509
ModuleNotFoundError: No module named 'cryptography'

I've tried to run it as ec2-user and as root both resulting in the same issue.

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