add-apt-repository is normally installed by default in Ubuntu and Debian distribution, but not in some variance such as Raspberry Pi OS. As such, you'll get the following command not found error when trying to add a repository to your system;
$ sudo add-apt-repository ppa:ondrej/php sudo: add-apt-repository: command not found
To have it on your system, you'll have to install software-properties-common like the following.
$ sudo apt update
$ sudo apt upgrade --assume-yes
$ sudo apt --assume-yes install software-properties-common
Guide compatibility:
Operating System |
---|
Ubuntu 16.04 LTS (Xenial Xerus) |
Ubuntu 16.10 (Yakkety Yak) |
Ubuntu 17.04 (Zesty Zapus) |
Ubuntu 17.10 (Artful Aardvark) |
Ubuntu 18.04 LTS (Bionic Beaver) |
Ubuntu 18.10 (Cosmic Cuttlefish) |
Ubuntu 19.04 (Disco Dingo) |
Comment anonymously. Login not required.