如果世界上某个地方已经有这个问题的答案,请提前抱歉,但我已经花了 3 个小时试图在我的 PRODUCTION 服务器中安装它,但我什么也没有。
我的需求:
我想在我的服务器上运行 git 命令(例如:推送、提交等)。为了做到这一点,我需要“git”命令(duh!)。
我尝试了什么:
试图遵循这个: http: //oli.zilla.org.uk/2010/12/07/installing-git-on-debian-lenny.html
还有这个:初学者的Git:权威的实用指南
还有这个:安装 Rails 插件需要 Git?
尝试下载源代码(http://packages.debian.org/lenny/i386/git-core/download),.deb文件(http://ftp.de.debian.org/debian/pool/main/ g/git/ )
问题:
尝试获取源时出现 404:http ://packages.debian.org/lenny/i386/git-core/download
下载软件包时,我尝试使用的所有存储库都给了我 404
需要将 libc6 从 2.7 更新到 2.9 才能安装 git-1.7.9,如下所示:
stewie:/tmp# dpkg -i git_1.7.9-1~bpo60+1_i386.deb
Selecting previously deselected package git.
(Reading database ... 20477 files and directories currently installed.)
Unpacking git (from git_1.7.9-1~bpo60+1_i386.deb) ...
dpkg: dependency problems prevent configuration of git:
git depends on libc6 (>= 2.9); however:
Version of libc6 on system is 2.7-18lenny7.
git depends on libcurl3-gnutls (>= 7.16.2-1); however:
Package libcurl3-gnutls is not installed.
git depends on libexpat1 (>= 1.95.8); however:
Package libexpat1 is not installed.
git depends on liberror-perl; however:
Package liberror-perl is not installed.
git depends on git-man (>> 1:1.7.9); however:
Package git-man is not installed.
git depends on git-man (<< 1:1.7.9-.); however:
Package git-man is not installed.
dpkg: error processing git (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
git
但找不到 Debian lenny 的 2.9
最后一个问题:
如何在我的 Debian 5 (lenny) 上安装 git?
尝试
尝试了@sarnold 解决方案,但是(更多 404):http: //justpaste.it/w5s
解决方案:
使用@sarnold 的评论(在他自己的回答中)!
啊。莱尼已从镜子中移除。你需要编辑你的sources.list 来使用archive.debian.org——你所有的包行,而不仅仅是这个新的。请考虑将此系统升级到受支持的版本。
如何:
编辑以下内容/etc/apt/sources.list
:
nano /etc/apt/sources.list
添加以下内容:
deb http://archive.debian.org/debian/ lenny main non-free contrib
deb-src http://archive.debian.org/debian/ lenny main non-free contrib
deb http://archive.debian.org/debian-security/ lenny/updates main non-free contrib
deb-src http://archive.debian.org/debian-security/ lenny/updates main non-free contrib
更新 apt-get 缓存:
apt-get update
安装 git:
apt-get install git-core
完毕!:)
后期编辑:
出于某种原因,Deutsch 镜像似乎仍然有效。只需添加
deb http://ftp.de.debian.org/debian-archive/debian/ lenny main
deb-src http://ftp.de.debian.org/debian-archive/debian/ lenny main
到您的sources.list 并尝试获取包。
或者,当然,尝试 Debian 反向移植:
deb http://backports.debian.org/debian-backports squeeze-backports main