Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 如何使用curl.h在Web服务器上安装git?没有这样的文件错误_Linux_Git_Curl_Ssh - Fatal编程技术网

Linux 如何使用curl.h在Web服务器上安装git?没有这样的文件错误

Linux 如何使用curl.h在Web服务器上安装git?没有这样的文件错误,linux,git,curl,ssh,Linux,Git,Curl,Ssh,我一直在尝试在我的web服务器上安装Git。当我尝试“makeinstall”时,我会遇到以下错误,我似乎无法克服这些错误 [root@site git-core-0.99.6]# make install gcc -o http-pull.o -c -g -O2 -Wall '-DSHA1_HEADER=<openssl/sha.h>' http-pull.c http-pull.c:6:23: error: curl/curl.h: No such file or direct

我一直在尝试在我的web服务器上安装Git。当我尝试“makeinstall”时,我会遇到以下错误,我似乎无法克服这些错误

[root@site git-core-0.99.6]# make install
gcc -o http-pull.o -c -g -O2 -Wall '-DSHA1_HEADER=<openssl/sha.h>' http-pull.c 
http-pull.c:6:23: error: curl/curl.h: No such file or directory
http-pull.c:7:23: error: curl/easy.h: No such file or directory
http-pull.c:16: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before â*â token 
http-pull.c: In function âfetch_indexâ:
http-pull.c:102: warning: implicit declaration of function âcurl_easy_setoptâ
[root@sitegit-core-0.99.6]#进行安装
gcc-ohttpull.o-c-g-O2-Wall'-DSHA1_头='httppull.c
http pull.c:6:23:error:curl/curl.h:没有这样的文件或目录
http pull.c:7:23:error:curl/easy.h:没有这样的文件或目录
httppull.c:16:error:expected–=;标记之前的–、–asm–或–属性
http pull.c:在函数fetch\u index中:
http pull.c:102:警告:函数-curl\u easy\u setopt的隐式声明

如果您需要查看的话,其中还有很多内容,但是尽管部分内容可能会涉及到这个问题,但是看起来您缺少curl开发包,如果您安装源代码(或使用发行版的包管理器),它可能会工作得更好


例如,在debian下,安装
libcurl4-gnutls-dev

我已经从我能看到的地方安装了curl,但是刚刚下载并键入'make'@Ben:curl是不够的,您必须下载curl的源代码才能获得
curl/curl.h
标题,请参阅我编辑的答案谢谢cedric。我的服务器说它是CentOS 5.7,但我看不出curl dev在这方面有什么优势?@Ben:然后下载源代码,提取它们,并告诉编译器在curl源代码目录中查找include谢谢cedric的帮助。我相信你是对的,但是我完全不懂linux/ssh等等,所以我什么也做不到。我想我设法下载了centos 5.7 curl dev更新,但当我尝试运行rpm时,它说它缺少其他依赖项。。