试图在CentOS服务器上安装Git

我试图按照这里提到的步骤: http : //wiki.railsmachine.com/InstallingGit

sudo yum --enablerepo=rpmforge install xmlto curl curl-devel # check for the latest version at http://git.or.cz/ wget http://kernel.org/pub/software/scm/git/git-1.6.6.tar.gz tar xvzf git-*.tar.gz cd git-* make configure ./configure --prefix=/usr --without-tcltk make all sudo make install 

但是,input完成后,这些都是我得到的问题:

 make: Warning: File `config.mak.autogen' has modification time 4e+02 s in the future SUBDIR perl make[2]: *** No rule to make target `/usr/lib/perl5/5.8.5/i386-linux-thread-multi/Config.pm', need ed by `perl.mak'. Stop. make[1]: *** [all] Error 2 make: *** [all] Error 2 

如果你已经把rpmforge作为yum源文件添加了,为什么不从那里安装git包? 这是一个比你编译的版本更新的版本。

git tarball包含一个RPM spec文件。 也就是说,您可以使用单个命令从tarball创buildgit二进制RPM: rpmbuild -ta git-1.7.3.2.tar.gz

现在,您可以使用RPM进行全新安装,而不是使用make install直接写入文件系统。 (这有很多好处,例如,如果一切都是由RPM安装的话,您总是可以用rpm -qf FILE查询哪个文件包来自哪个文件。)