概述
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 :~$
最后
以上就是酷酷洋葱为你收集整理的add-apt-repository问题的全部内容,希望文章能够帮你解决add-apt-repository问题所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复