How to fix add-apt-repository: command not found

I was adding a repository for latest PHP version and got an error of command not found. It’s easy to fix, read on how to fix add-apt-repository: command not found.

It is most likely that the software properties packages is not installed.

ubuntu-add-apt-repository-command-not-found

You can quickly install it by running the following command.

apt install software-properties-common

This will install the required packages and you can safely add your repository now.