add-apt-repository问题

64位ubuntu server下sudo:add-apt-repository:command not found 问题
新装了Ubuntu Server 12.04,然后升级到Raring Ringtail(development branch),当然许多的软件和环境都要重新配置,所以会遇到问题。首先少不了ppa仓库的一些常见问题。
比如想要在Ubuntu Server 安装个最新的git,
直接执行命令:
sudo add-apt-repository ppa:git/ppa
错误来啦:
sudo: add-apt-repository:command not found
网上解决办法是直接安装工具包 命令:
sudo apt-get install python-software-properties
亲测安装后还是报command not found,所以依赖包还没有安装完全
执行命令:add-apt-repository 
除了要安装python-software-properties外还需要software-properties-common
执行安装命令:
sudo apt-get install software-properties-common
例如:
sam@ubuntu :~$ sudo apt-get install python-software-properties
Reading package lists... Done
Building dependency tree 
Reading state information... Done
The following extra packages will be installed:
 python-pycurl unattended-upgrades
Suggested packages:
 libcurl4-gnutls-dev python-pycurl-dbg bsd-mailx
The following NEW packages will be installed:
 python-pycurl python-software-properties unattended-upgrades
0 upgraded, 3 newly installed, 0 to remove and 81 not upgraded.
Need to get 97.3 kB of archives.
After this operation, 657 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://cn.archive.ubuntu.com/ubuntu/ precise-updates/main unattended-upgrades all 0.76ubuntu1.1 [24.7 kB]
Get:2 http://cn.archive.ubuntu.com/ubuntu/ precise/main python-pycurl amd64 7.19.0-4ubuntu3 [49.2 kB]
Get:3 http://cn.archive.ubuntu.com/ubuntu/ precise-updates/main python-software-properties all 0.82.7.7 [23.5 kB]
Fetched 97.3 kB in 0s (266 kB/s) 
Preconfiguring packages ...
Selecting previously unselected package unattended-upgrades.
(Reading database ... 52993 files and directories currently installed.)
Unpacking unattended-upgrades (from .../unattended-upgrades_0.76ubuntu1.1_all.deb) ...
Selecting previously unselected package python-pycurl.
Unpacking python-pycurl (from .../python-pycurl_7.19.0-4ubuntu3_amd64.deb) ...
Selecting previously unselected package python-software-properties.
Unpacking python-software-properties (from .../python-software-properties_0.82.7.7_all.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up unattended-upgrades (0.76ubuntu1.1) ...
Setting up python-pycurl (7.19.0-4ubuntu3) ...
Setting up python-software-properties (0.82.7.7) ...
sam@ubuntu :~$ sudo apt-get install software-properties-common
Reading package lists... Done
Building dependency tree 
Reading state information... Done
The following NEW packages will be installed:
 software-properties-common
0 upgraded, 1 newly installed, 0 to remove and 81 not upgraded.
Need to get 8,450 B of archives.
After this operation, 132 kB of additional disk space will be used.
Get:1 http://cn.archive.ubuntu.com/ubuntu/ precise-updates/main software-properties-common all 0.82.7.7 [8,450 B]
Fetched 8,450 B in 0s (63.8 kB/s) 
Selecting previously unselected package software-properties-common.
(Reading database ... 53066 files and directories currently installed.)
Unpacking software-properties-common (from .../software-properties-common_0.82.7.7_all.deb) ...
Setting up software-properties-common (0.82.7.7) ...
sam@ubuntu :~$
 
sam@ubuntu :~$ sudo add-apt-repository ppa:git-core/ppa
You are about to add the following PPA to your system:
 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
gpg: keyring `/tmp/tmpEE0fsN/secring.gpg' created
gpg: keyring `/tmp/tmpEE0fsN/pubring.gpg' created
gpg: requesting key E1DF1F24 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpEE0fsN/trustdb.gpg: trustdb created
gpg: key E1DF1F24: public key "Launchpad PPA for Ubuntu Git Maintainers" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
sam@ubuntu :~$
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值