在Centos-5安装git时,遇到了一些情况:
1、
下载git 版本:# wget http://www.kernel.org/pub/software/scm/git/git-1.6.6.tar.gz
在输入命令:# make 之后,出现了一下错误:
make[1]: Warning: File `Makefile' has modification time 2.5e+07 s in the future
/usr/bin/perl Makefile.PL PREFIX='/usr/local'
Writing perl.mak for Git
make[1]: warning: Clock skew detected. Your build may be incomplete.
GEN git-add--interactive
make[1]: Warning: File `Makefile' has modification time 2.5e+07 s in the future
Writing perl.mak for Git
make[2]: Warning: File `Makefile.PL' has modification time 2.5e+07 s in the future
Writing perl.mak for Git
make[2]: *** [perl.mak] Error 1
make[1]: *** [instlibdir] Error 2
make: *** [git-add--interactive] Error 2
在网上搜索了一些,根据出错的warning发现是机器时间设置的问题。。是机器系统的时间比版本的时间早。所以要系统时间重新设置。
date -s Y/M/D
date -s H/M/S
在按照以前的安装步骤进行安装,就会成功。。。
安装完之后:#查看版本信息
# git --version
git version 1.6.6
出现版本信息证明安装正确。
2、在使用在线帮助:man git 中提示:
[root@xyuan ~]# man git
No manual entry for git
解决方法:是未按张对应版本的manpages;
查看git 版本
[root@xyuan ~]# git --version
git version 1.7.1
下载对应版本的manpages:
wgethttp://www.kernel.org/pub/software/scm/git/git-manpages-1.7.0.tar.gz
解压到/usr/share/man目录下就可以了。这个包是编译好的,不是源码的安装包。
这时就可以使用 man git 了。
在为解决前可以使用:git --help 查看一些简单的命令帮助