http.h:6:23: fatal error:curl/curl.h:there is no this file/directory

风格不统一 提交于 2021-01-01 03:13:32

问题


I download the git package in my CentOS-7:

wget https://www.kernel.org/pub/software/scm/git/git-2.0.1.tar.gz
tar xzf git-2.0.1.tar.gz

When I compile the git:

cd git-2.0.1
make prefix=/usr/local/git all

I get the bellow error:

  ...
  CC vcs-svn/svndump.o
  AR vcs-svn/lib.a
  LINK git-remote-testsvn
  CC http.o
  In file included from http.c:2:0:
  http.h:6:23: fatal error:curl/curl.h:No such file or directory
  #include <curl/curl.h>

回答1:


Seems you did not install the curl.

Use bellow command to install curl

yum install curl-devel -y

then retry your compile.




回答2:


You need to install git dependencies, if you are on Ubuntu you can use the following command to get rid of this error.

sudo apt update
sudo apt install make libssl-dev libghc-zlib-dev libcurl4-gnutls-dev libexpat1-dev gettext unzip

This worked for me.

Source : https://linuxize.com/post/how-to-install-git-on-ubuntu-18-04/



来源:https://stackoverflow.com/questions/50245367/http-h623-fatal-error-curl-curl-h-there-is-no-this-file-directory

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!