I use to putty
git clone --recurse-submodules git://github.com/samtools/htslib.git
git clone git://github.com/samtools/bcftools.git
cd bcftools
make <-The following error occurs in this area.
hfile_libcurl.c:47:10: fatal error: curl/curl.h: No such file or directory
47 | #include <curl/curl.h>
| ^~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:164: hfile_libcurl.o] Error 1
make[1]: Leaving directory '/home/kang/project/htslib'
make: *** [../htslib/htslib.mk:159: ../htslib/hts-object-files] Error 2
Do you know how to solve this error?
2 answers
As noted in the instructions in HTSlib's INSTALL (emphasis added):
The
./configurecommand checks your build environment and allows various optional functionality to be enabled. If you don't want to select any optional functionality, you may wish to omit configure and just typemake; make installas for previous versions of HTSlib. However if the build fails you should run./configureas it can diagnose the common reasons for build failures.
You have used just make and omitted running configure. It is strongly recommended to run configure, and in this case the configure script will detect the absence of curl/curl.h and report it along with details of how to resolve the problem on several common platforms.
curl/curl.h: No such file or directory
install curl dev https://askubuntu.com/questions/78183
Log in to answer this question.