no add-apt-repository command

本文介绍了解决在Ubuntu系统中遇到add-apt-repository命令缺失的问题。通过安装software-properties-common和python-software-properties包来启用该命令,并演示了如何使用此命令添加PPA、更新软件源及升级git的过程。

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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值