Created
May 10, 2016 04:14
-
-
Save rsrini7/98aebdde3fcdc06e87d014ca50027b38 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Problem: apt-get-repository Command is Missing | |
| I was trying to install the latest version of git from the Ubuntu Git Maintainers Team and I needed to add a Personal Package Archive (PPA) to the Software Sources. But when I tried to do this, I got an error: | |
| ? | |
| sudo: add-apt-repository: command not found | |
| Solution: Install the software-properties-common Package | |
| To get the add-apt-repository command, install the software-properties-common package. For my Ubuntu version (precise), I also had to install the python-software-properties package: | |
| ? | |
| $ sudo apt-get install software-properties-common python-software-properties | |
| Then then you add the PPA, update your sources, and upgrade your the package. In may case, I wanted to upgrade git, so I did the following: | |
| ? | |
| $ sudo add-apt-repository ppa:git-core/ppa | |
| $ sudo apt-get update | |
| $ sudo apt-get install git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The “add-apt-repository: command not found” problem occurs when the system does not have the “add-apt-repository” package installed on it. To install this package, the system repository needs to be updated
$ sudo apt updateThen the “software-properties-common” package needs to be installed.
$ sudo apt install software-properties-commonThis guide contains detailed answers on this issue.