0

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"
/var/lib/flatpak/runtime/org.gnome.Sdk/x86_64/3.38/5f699dd2ab3afb8c078649a1b0ef0624b54550037663570564826afd9fc5df42/files/include/curl/curl.h
/var/lib/docker/overlay2/14ac69baa1d75f37492f33a3996b04e0dd4764c19554f1a68450cf1b59e42947/diff/usr/include/x86_64-linux-gnu/curl/curl.h
/var/lib/docker/overlay2/8e36839fbd749a189f85c2474af52036e879e54580c91c000564c6e0925bfd95/diff/usr/include/x86_64-linux-gnu/curl/curl.h
1
  • 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

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 .