4

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

export PATH=/usr/local:$PATH

我来源 .bashrc,并且 echo $PATH 显示设置路径 '/usr/local:/'
当我

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)

谁能帮我找到答案?

4

2 回答 2

1

要编译git,您不仅需要curl二进制文件,还需要开发包(我相信它libcurl-dev在 Ubuntu 中被称为或类似的东西),以及zlib expatgettext开发包。要构建文档,您将需要asccidocmakeinfo和程序。docbook2Xdblatex

于 2013-03-16T18:24:42.790 回答
0

冯布兰德是对的(+1),这是对他答案的补充。

在 Red Hat Enterprise Linux Server 6.3 版(圣地亚哥)上,我必须安装一些软件包才能编译git1.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
于 2013-07-26T14:30:26.937 回答