在Ubuntu14.04不能添加PPA源到apt源的问题解决方法

在Ubuntu14.04使用apt-get 更新Git 时,需要更新apt源,添加一个带有最新Git的源,

如下命令:

$ sudo add-apt-repository ppa:git-core/ppa

Cannot add PPA: 'ppa:~git-core/ubuntu/ppa'.
ERROR: '~git-core' user or team does not exist.

出现不能添加PPA源的问题,那么怎么解决呢?

你需要export ubuntu 一些环境变量:

export http_proxy="http://username:password@proxy:port/"
export https_proxy="https://username:password@proxy:port/"

 

然后就可以添加PPA源了

$ sudo -E add-apt-repository ppa:git-core/ppa

出现如下:

The most current stable version of Git for Ubuntu.

For release candidates, go to https://launchpad.net/~git-core/+archive/candidate .
 More info: https://launchpad.net/~git-core/+archive/ubuntu/ppa
Press [ENTER] to continue or ctrl-c to cancel adding it

提示按ENTER键继续, 按下ENTER就OK了

你可能感兴趣的:(linux)