When trying to add a repository package or another repository link to their apt sources, many users receive the error message “add apt repository command not found”. Don’t worry. This post of MiniTool can help you fix it with 2 simple steps.
What Causes the “add-apt-repository: command not found” Error
One of the common ways to install software and applications Ubuntu and Debian distributions is to use the Personal Package Archive (PPA) repository package. With the add-repository package or software, you can easily add a PPA repository from your terminal without having to manually edit the apt sources and add repositories.
If you want to add a repository package or a PPA package from your terminal, you can run the add-apt-repository command (sudo add-apt-repository ppa: name/ppa). However, you could get the “add-apt-repository: command not found” error when the repository package is not installed or missing on your system.
How to fix the “sudo add apt repository command not found” error? Let’s keep reading the following steps.
Are you troubled by the command "python setup.py egg_info" failed with error code 1? Don’t worry. This post explores several effective fixes for you.
Fix the “add-apt-repository: command not found” Error with 2 Steps
As mentioned above, the main reason for the “add apt repository not found” error is the missing add-repository package. So, all the thing you need to do is to reinstall the package on your system. There are 2 simple steps for this installation guide.
Step 1. Update your local repositories.
- Open a terminal window / command line by using the Ctrl + Alt + T or Ctrl + Alt + F2 key combinations.
- In the pop-up window, execute the sudo apt update command to update the local repositories. If you are in Ubuntu or Linux Mint system, you can try running the sudo apt update && sudo apt-upgrade
--image from linuxbabe
Step 2. Install the software-properties-common package.
The add-apt-repository command is not a regular package that can be installed with apt on Ubuntu or Debian system. It is a component of the software-properties-common package instead.
- In the terminal window, execute the sudo apt install software-properties-common This command will get the software-properties-common package installed.
- Update your local repositories again by running the sudo apt update
Now, the “add-apt-repository command not found” error should be fixed. You can add any PPA repository again by running the sudo add-apt-repository ppa: name/ppa command.
Extra Tip: How to Add Apt Repositories in Ubuntu & Debian
What can you do when the software packages aren’t included in the default repositories? In this case, you can run the add-apt-repository command to grant access to the software package that you want to install.
For instance, you want to install the Wine package on your Linux system, but it is non-Linux system software and the latest version is not available for the default repositories. To install the Wine package on your system, you can execute the sudo apt-add-repository ‘deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main’ command to grant access to Wine repositories.