Sudo certbot command not found

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: newcreationreality.com

I ran this command: ```
sudo certbot -d $DOMAIN -d $WILDCARD --manual --preferred-challenges dns certonly

It produced this output: sudo: certbot: command not found

My web server is (include version):

The operating system my web server runs on is (include version):

My hosting provider, if applicable, is: Amazon Lightsail

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

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

The version of my client is (e.g. output of `certbot --version` or `certbot-auto --version` if you're using Certbot): certbot: command not found

I’m following this tutorial for my Wordpress Lightsail instance:
https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-using-lets-encrypt-certificates-with-wordpress#install-certbot-on-your-instance-wordpress
I get to the cert request and it acts like certbot isn’t installed. Anything else I could try?

Did you install Certbot?

Did it work?

If you run “ls -l /usr/bin/certbot”, does it exist?

This was returned: ls: cannot access /usr/bin/certbot: No such file or directory
I used this command to install: ```
sudo apt-get install certbot -y

I did it again and I see now it's returning an error: 
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package certbot

What OS are you using?

Did you run the previous two three four commands?

Did they succeed?

The Wordpress is using Bitnami. I’m working from an SSH session using putty.
I just ran all the steps again and they all seemed to succeed except the cert request.
I wonder if there’s an issue with Amazon’s Lightsail install.

This looks like an error that you would see if you skipped step 5 or 6, or if either of these steps failed. Are you sure that you followed step 5 in the tutorial?

This is the result of step 5:

gpg: keyring /tmp/tmpi9lvajft/secring.gpg' created gpg: keyring/tmp/tmpi9lvajft/pubring.gpg’ created
gpg: requesting key 75BCA694 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpi9lvajft/trustdb.gpg: trustdb created
gpg: key 75BCA694: public key “Launchpad PPA for certbot” imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK

Here are 20 links of step 6:

Hit http://us-east-2.ec2.archive.ubuntu.com trusty/multiverse amd64 Packages
Hit http://us-east-2.ec2.archive.ubuntu.com trusty/main Translation-en
Hit http://us-east-2.ec2.archive.ubuntu.com trusty/multiverse Translation-en
Hit http://us-east-2.ec2.archive.ubuntu.com trusty/restricted Translation-en
Hit http://us-east-2.ec2.archive.ubuntu.com trusty/universe Translation-en
Hit http://security.ubuntu.com trusty-security InRelease
Hit http://ppa.launchpad.net trusty InRelease
Ign http://us-east-2.ec2.archive.ubuntu.com trusty/main Translation-en_US
Ign http://us-east-2.ec2.archive.ubuntu.com trusty/multiverse Translation-en_US
Ign http://us-east-2.ec2.archive.ubuntu.com trusty/restricted Translation-en_US
Ign http://us-east-2.ec2.archive.ubuntu.com trusty/universe Translation-en_US
Hit http://security.ubuntu.com trusty-security/main Sources
Hit http://security.ubuntu.com trusty-security/universe Sources
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Hit http://security.ubuntu.com trusty-security/main amd64 Packages
Hit http://security.ubuntu.com trusty-security/universe amd64 Packages
Hit http://ppa.launchpad.net trusty/main Translation-en
Hit http://security.ubuntu.com trusty-security/main Translation-en
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Reading package lists… Done

I thiink I found the OS by accident: GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)

I think the tutorial is wrong because the list of packages that it asked you to install is incomplete!

@bmw, could you confirm this? The tutorial is only calling for

sudo apt-get install certbot -y

from the PPA.

IIRC, the PPA no longer contains packages for Ubuntu Trusty. The Trusty PPA still exists, so enabling it doesn’t produce an error, but it’s empty.

@jackdlarue, Ubuntu 14.04 Trusty is an old OS that’s out of standard support. (You have to pay Canonical for Extended Security Maintenance.)

The method you’re using to install Certbot no longer works on Trusty, and that tutorial seems to be using the supported (though not current) Ubuntu 16.04 Xenial.

To use Certbot, you should upgrade to another OS. Alternatively, you can use a different ACME client that still supports Trusty.

2 Likes

Well, the Amazon Lightsail service is like a shared VPS host but I could engage their support to either upgrade the OS or remove the tutorial. Any suggestions for an alternate ACME client with Trusty support?

1 Like

It took a learning curve but I was able to get it working with these instructions:
https://bobcares.com/blog/lightsail-install-ssl/
Thanks for all the input.

@mnordhoff, thanks for clarifying this—I didn’t think about the possibility of an older OS version.

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