fix add-apt-repository

Solve add-apt-repository: Command Not Found on Ubuntu

When you face this issue Solve and fixadd-apt-repository: Command Not Found”. I will show you here how to solve this. We can install a software-properties-common package when command not found on the ubuntu system. so

If you try to run sudo apt install add-apt-repository, this won’t work if the below packages are not installed on the systems. so

Check Out: Install New Microsoft Edge Browser Based on Chromium On Windows

Search Command: so

You can’t run the above command directly as it comes with the software-properties-common package. we can search for command. 

[email protected]:~$ sudo dpkg -S /usr/bin/add-apt-repository
software-properties-common: /usr/bin/add-apt-repository

Or

[email protected]:~$ sudo apt-file search add-apt-repository

The above command is used to add the PPA(Personal package archive) in Debian and Ubuntu systems. 

Check Out: DPKG Error Parsing File ‘/var/lib/dpkg/updates/0008 In Ubuntu 19.04

Install the Packages for Ubuntu 14.04 or later:

We need to install the packages because it’s a part of package software-properties-common and you have to install it using the below command. 

[email protected]:~$ sudo apt-get install software-properties-common
Now you have to update the system using sudo apt update and Once it's updated. 
you can use apt-add-repository or add-apt-repository command to add the
PPA.

Check Out: Unable To lock Administration Directory (/var/lib/dpkg/) On Ubuntu 18.04

Install the Packages for Ubuntu 12.10 or older:

If you’re using an older release of ubuntu 12.10 or older, you have to run the below commands and need to add the required packages. 

[email protected]:~$ sudo apt install python-software-properties

Once you have installed the package. Now you can add the repository using the below command. 

[email protected]:~$ sudo add-apt-repository ppa:some/ppa

You’re done fix add-apt-repository software-properties-common not found

LEAVE A REPLY

Please enter your comment!
Please enter your name here