When you try to add a new software repository then there are chances you face the “add-apt-repository command not found’ Ubuntu error, this article shows you to FIX it for good. This is used to indicate that its package is missing from the system.
Follow through to know how to resolve this issue on Ubuntu and Debian based Linux distributions.
Before you begin:
- Need user account with Sudo privileges.
- Need access to a terminal window or command line (Ctrl-Alt-T or Ctrl-Alt-F2).
Table of Contents
- 1 What you need to know about Ubuntu Repositories
- 2 2 Ways How to resolve add-apt-repository- Command not found an error
- 3 Adding an Apt repository in Ubuntu and Debian (Simple Way)
- 4 Conclusion
What you need to know about Ubuntu Repositories
A software package is an application; in particular cases, one package needs another known as dependencies to run.
The package manager is used to do the work of the loading software package you want. Now if there are any dependencies then it installs those as well. Moreover, it keeps track of all the installed software and updates automatically.
It works in tandem with a software repository; this is a database of different software packages. Every Linux distribution gives access to a set of basic, default repositories by default.
In Ubuntu these are as followed:
- Main – It is a free and open-source software from the developers of Ubuntu.
- Universe –It is a free and open-source software from the Linux community.
- Restricted –The device drivers and other software under licensing from manufacturers.
- Multiverse –All other software that is under the copyright or legal restrictions.
In Debian, these are as followed:
- Main – It is free licensed software.
- Contrib –Free software that depends on non-free licensed software.
- Non-free – software with restrictions on use and distribution.
Now, if you want to install a software package then these are not included in them; for this, you need to add that to your package manager.
2 Ways How to resolve add-apt-repository- Command not found an error
Method #1: Update Local Ubuntu Repositories
First, you need to open the “terminal window” and enter the command in order to update repositories.
Sudo apt-get update
The system then confirms that this list there on your local machine is updating.
Method #2: Get the Package Software Properties Common Installed – Fix ‘Unable to Locate’ issue
This command is not a regular package that can be installed with the use of apt on Debian or Ubuntu LTS 18.04, 16.04, and 14.04. This is actually a component of this package.
To get rid of this command you need to install its package:
Sudo apt-get install software-properties-common
Following is an example of output after the installation has been successful
DekiSoft Fact: In Ubuntu version 13.10 and older, this command is part of the python software package. To install this you need to use the following command:
Sudo apt-get install python-software-properties
Adding an Apt repository in Ubuntu and Debian (Simple Way)
Keep in mind that certain software packages are not included in the default repositories. Developers have created their own to make the installation process easy. This is when this command is used.
For example; Wine is a known yet popular package for running non-Linux software there on a Linux system, but through default repositories, the latest version is not available.
To get its latest version; you need to first give permission to it:
sudo apt-add-repository ‘deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main’
The other subject might be subject to additional licensing. In the case of Debian, restrictive licensing might disqualify the package from getting included in these. In such cases, this command is used as a key to grant access to the software you wish to install.
In this we have highlighted for you regarding your use can fix the add-apt-repository command not found on Ubuntu and Debian. Follow the steps accurately to get the desired results. If you find this article to be helpful or have any queries or suggestions then feel free to leave your comments in the section below.