git 安装遇到的情况

在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 查看一些简单的命令帮助

转载于:https://www.cnblogs.com/yxic/archive/2010/10/27/1862642.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值