no add-apt-repository command

来源:互联网 发布:淘宝上14k包金会掉色么 编辑:程序博客网 时间:2024/04/28 17:01

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



And boom — I was all set.

0 0
原创粉丝点击