我无法在 ubuntu 12.10 系统上安装 git。我按照以下方法操作:
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git-core
sudo apt-get update
给了我错误-
Err http://security.ubuntu.com quantal-security/main amd64 Packages
404 Not Found
Err http://security.ubuntu.com quantal-security/restricted amd64 Packages
404 Not Found
Err http://security.ubuntu.com quantal-security/universe amd64 Packages
404 Not Found
Err http://security.ubuntu.com quantal-security/multiverse amd64 Packages
404 Not Found
Err http://archive.ubuntu.com quantal-updates/main amd64 Packages
404 Not Found
Err http://archive.ubuntu.com quantal-updates/restricted amd64 Packages
404 Not Found
Err http://archive.ubuntu.com quantal-updates/universe amd64 Packages
404 Not Found
Err http://archive.ubuntu.com quantal-updates/multiverse amd64 Packages
404 Not Found
Err http://archive.ubuntu.com quantal/main amd64 Packages
404 Not Found
Err http://archive.ubuntu.com quantal/restricted amd64 Packages
404 Not Found
Err http://archive.ubuntu.com quantal/universe amd64 Packages
404 Not Found
Err http://archive.ubuntu.com quantal/multiverse amd64 Packages
404 Not Found
然后出现了一些获取失败的错误,最后-
E: Some index files failed to download. They have been ignored, or old ones used instead.
当我跑步的时候sudo apt-get install git
,我会-
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
git-man liberror-perl
Suggested packages:
git-daemon-run git-daemon-sysvinit git-doc git-el git-arch git-cvs git-svn
git-email git-gui gitk gitweb
The following NEW packages will be installed:
git git-man liberror-perl
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 6,800 kB/6,824 kB of archives.
After this operation, 15.3 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
liberror-perl git-man git
Install these packages without verification [y/N]? y
Err http://archive.ubuntu.com/ubuntu/ quantal/main git-man all 1:1.7.10.4-1ubuntu1
404 Not Found
Err http://archive.ubuntu.com/ubuntu/ quantal/main git amd64 1:1.7.10.4-1ubuntu1
404 Not Found
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/git/git-man_1.7.10.4-1ubuntu1_all.deb 404 Not Found
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/git/git_1.7.10.4-1ubuntu1_amd64.deb 404 Not Found
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
我刚刚设置了 ubuntu,这是我第一次尝试安装。请帮忙。
答案1
Ubuntu 12.10 已达到使用寿命终止状态并且不再受支持。
您使用 digitalocean 镜像,
编辑你的 /etc/apt/source.list 如下:
deb http://archive.ubuntu.com/ubuntu precise main
deb http://archive.ubuntu.com/ubuntu precise-updates main
deb http://security.ubuntu.com/ubuntu precise-security main universe
deb http://archive.ubuntu.com/ubuntu precise universe
deb http://archive.ubuntu.com/ubuntu precise-updates universe
然后执行
do-release-upgrade
对于尚未升级的用户,这只是一个临时的解决方法,但仍然强烈建议您的系统尽快升级到最新版本,以获得所有安全更新。