`
cywhoyi
  • 浏览: 412627 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

Ubuntu下安装GIT

阅读更多

1.下载git  http://code.google.com/p/git-core/downloads/detail?name=git-1.7.11.2.tar.gz

或者使用在线下载

wget http://git-core.googlecode.com/files/git-1.7.10.rc4.tar.gz
wget http://git-core.googlecode.com/files/git-manpages-1.7.10.rc4.tar.gz
2.安装依赖
sudo apt-get install libcurl4-gnutls-dev librtmp-dev libcurl4-openssl-dev libexpat1-dev gettext
3.安装git
./configure -prefix=/usr/local/git
 make
如果出现异常git-compat-util.h:168:25: 致命错误: openssl/ssl.h:没有那个文件或目录 编译中...
安装方法:
sudo apt-get update
sudo apt-get install git-core
验证成功:
$ git --version
root@GeekerYoung:~# cd  /usr/local
root@GeekerYoung:/usr/local# ls
apache  chrome  games  include  lib  qq    share
bin     etc     git    jboss    man  sbin  src
root@GeekerYoung:/usr/local# cd git
root@GeekerYoung:/usr/local/git# ls
git-1.7.10.rc4         git-1.7.11.2         git-manpages-1.7.10.rc4.tar.gz
git-1.7.10.rc4.tar.gz  git-1.7.11.2.tar.gz
root@GeekerYoung:/usr/local/git# git --version
git version 1.7.9.5

 
查看git
git help
 
 

 

0
1
分享到:
评论
2 楼 cywhoyi 2013-12-12  
君淋天下 写道
可以直接apt安装git  没必要自己编译

多谢
1 楼 君淋天下 2013-12-12  
可以直接apt安装git  没必要自己编译

相关推荐

Global site tag (gtag.js) - Google Analytics