Everywhere people say you'll have to apt install libcurl. But I'm on manjaro and I have curl installed, there is no libcurl in the repo.

No idea what to do now.

In file included from ../main/main.c:1:
../main/main.cpp:2:10: fatal error: curl/curl.h: No such file or directory
 #include <curl/curl.h>
➜  lib sudo find /var/lib -name "curl.h"
  • libcurl and the libcurl development headers are two different things. So, it seems that, no, you haven't installed the necessary package! Also, why look in /var/lib for headers? I'd rather look in /usr/include :) Apr 3, 2022 at 12:49

1 Answer 1


You can find out which package contains a file curl/curl.h:

$ # update search cache first
$ pacman -Fy
$ # now look for packages containing a file that matches curl/curl.h
$ pacman -Fx /curl/curl.h
usr/include/curl/curl.h is owned by core/curl 7.82.0-1
usr/lib/pacman/include/curl/curl.h is owned by core/pacman-static 6.0.1-2
usr/include/obs/util/curl/curl-helper.h is owned by community/obs-studio 27.2.1-1
usr/include/tarantool/curl/curl.h is owned by community/tarantool 2.9.0-3

So, the curl package you'd get vial pacman -S curl contains that. If your build doesn't find that, it means that for some reason, the default include path /usr/include is not where the compiler looks into for headers. Something is strange with your build setup! But that's not manjaro's fault; something must have explicitly told your C toolchain to not look into default locations where manjaro installs headers.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .