[Ubuntu] Solution for 'sudo: add-apt-repository: command not found' Error
I’ll show you how to solve the sudo: add-apt-repository: command not found error that occurs when trying to install Certbot for setting up Let’s Encrypt auto-renewal on Ubuntu.
Error Message
$ sudo add-apt-repository ppa:certbot/certbot
sudo: add-apt-repository: command not found
You can resolve the “sudo: add-apt-repository: command not found” error by running apt-get install on any of these three packages:
sudo apt-get install software-properties-common
sudo apt-get install python3-software-properties
sudo apt-get install python-software-properties
After installation, try running sudo add-apt-repository ppa:certbot/certbot again, and it should work as shown below:
$ sudo add-apt-repository ppa:certbot/certbot
This is the PPA for packages prepared by Debian Let's Encrypt Team and backported for Ubuntu(s).
More info: https://launchpad.net/~certbot/+archive/ubuntu/certbot
Press [ENTER] to continue or ctrl-c to cancel adding it
gpg: keyring `/tmp/tmpg3b8izxd/secring.gpg' created
gpg: keyring `/tmp/tmpg3b8izxd/pubring.gpg' created
gpg: requesting key 75BCA694 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpg3b8izxd/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
That’s all.
That’s all from the Gemba.