2013-03-04 147 views
4

在Ubuntu 10.04.4 LTS上,我使用apt-get install将git升级到了1.8.1.1
现在我下载了git-1.8.1.5.tar.gz,并且想要构建来升级git。
我已经设置了$ PATH环境变量中的.bashrc
将git升级到1.8.1.5失败

export PATH=/usr/local:$PATH 

我的.bashrc源和回声$ PATH显示设置路径 '的/ usr /地方:/'
当我

make prefix=/usr/local all doc info 

错误出现:

In file included from http.c:1: 
http.h:6:23: warning: curl/curl.h: no such file or directory 
http.h:7:23: warning: curl/easy.h: no such file or directory 
In file included from http.c:1: 
http.h:46: error: expected specifier-qualifier-list before ‘CURLcode’ 
http.h:51: error: expected specifier-qualifier-list before ‘CURL’ 
http.h:97: error: ‘CURL_ERROR_SIZE’ undeclared here (not in a function) 
http.h: In function ‘missing__target’: 
http.h:102: error: ‘CURLE_FILE_COULDNT_READ_FILE’ undeclared (first use in this function) 
http.h:102: error: (Each undeclared identifier is reported only once 
http.h:102: error: for each function it appears in.) 
http.h:104: error: ‘CURLE_HTTP_NOT_FOUND’ undeclared (first use in this function) 

有人能帮助我找到一个swer?

+2

有你安装curl(可能是libcurl4-dev)? – 2013-03-04 09:19:30

+0

@NevikRehnel,安装libcurl4-dev,curl错误丢失。但另一个错误出现:ASCIIDOC git-add.html/bin/sh:asciidoc:找不到make [1]:*** [git-add.html]错误127 make [1]:离开目录/home/vnc/git-1.8.1.5/Documentation'make:*** [doc] error 2 – Venus 2013-03-04 09:35:46

+4

@Venus是asciidoc的安装路径? ('asciidoc --help'返回什么?) – VonC 2013-03-04 10:34:36

回答

1

要编译git,你不仅需要curl二进制文件,而且还开发包(我相信它被称为libcurl-dev或Ubuntu的类似的东西),还有zlibexpatgettext开发包。要构建文档,您需要asccidocmakeinfo,docbook2Xdblatex程序。

+2

这些依赖关系是否记录在某处? – Michael 2014-08-22 04:11:18

+0

@Michael它在这里:https://git-scm.com/book/en/v2/Getting-Started-Installing-Git#Installing-from-Source – kol 2016-05-06 09:53:10

0

vonbrand是正确的(+1),这是他的答案的补充。

在Red Hat Enterprise Linux的服务器版本6.3(圣地亚哥),我必须安装一些软件包以编译git 1.8.3.3,1.8.3.4和1.8.4.rc0版本:

sudo yum install perl-ExtUtils-MakeMaker.x86_64 
sudo yum install libcurl-devel.x86_64 
sudo yum install expat-devel.x86_64