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
 
 

 

你可能感兴趣的:(Ubuntu下安装GIT)