While visiting different online forums i came across so many people annoyed with this error message on their fresh Linux install, while they try to run “add-apt-repository” command:
add-apt-repository command not found
Why you get this error message:
“add-apt-repository” command adds the repository to the list of places the system goes to look for software in your Linux OS. If you want to add some Personal Package Archive (PPA) you normally use “add-apt-repository” command. By default this command not come pre-installed.
Debian and Ubuntu LTS.
How to Fix:
This is a very common error in Ubuntu & other servers. You can easily fix this by installing a packages to your system. All you have to do is install the following package based on operating system version you are using.
If you are using Debian or Ubuntu LTS (12.04, 14.04 and 16.04) versions, you must install this software-properties-common package.
Note: If you are using older version of the OS such as Ubuntu 13.10 and earlier, the add-apt-repository command is available in python-software-properties package.
In this case you have to use the following command to install this package.
that’s it, you just fixed the “add-apt-repository command not found” error and you are now ready to run the “add-apt-repository” without any issues.
Here is an sample command for adding a personal package archive to your OS.
The above command will add “Java (JDK) 8/9 Installer PPA” on your system.
Feel free to drop a comment and let me know if this step-by-step tutorial fix your issue or not.