基本上标题是:Debian 9:致命错误:' curl / curl.h'文件未找到,即使安装了libcurl4-openssl-dev?
的config.log:
configure:5741: checking for curl-config
configure:5759: found /usr/bin/curl-config
configure:5771: result: /usr/bin/curl-config
configure:5782: checking for the version of libcurl
configure:5789: result: 7.52.1
configure:5796: checking for libcurl >= version 7.15.2
configure:5809: result: yes
configure:5850: checking whether libcurl is usable
configure:5884: aarch64-linux-android-clang -o conftest -O3 -mfpu=neon conftest.c -lcurl >&5
conftest.c:31:10: fatal error: 'curl/curl.h' file not found
#include <curl/curl.h>
^~~~~~~~~~~~~
1 error generated.
configure:5884: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "cpuminer"
| #define PACKAGE_TARNAME "cpuminer"
| #define PACKAGE_VERSION "1.0.3"
| #define PACKAGE_STRING "cpuminer 1.0.3"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "cpuminer"
| #define VERSION "1.0.3"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_SYS_ENDIAN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_DECL_BE32DEC 0
| #define HAVE_DECL_LE32DEC 0
| #define HAVE_DECL_BE32ENC 0
| #define HAVE_DECL_LE32ENC 0
| #define HAVE_ALLOCA_H 1
| #define HAVE_ALLOCA 1
| #define HAVE_GETOPT_LONG 1
| /* end confdefs.h. */
| #include <curl/curl.h>
| int
| main ()
| {
|
| /* Try and use a few common options to force a failure if we are
| missing symbols or can't link. */
| int x;
| curl_easy_setopt(NULL,CURLOPT_URL,NULL);
| x=CURL_ERROR_SIZE;
| x=CURLOPT_WRITEFUNCTION;
| x=CURLOPT_WRITEDATA;
| x=CURLOPT_ERRORBUFFER;
| x=CURLOPT_STDERR;
| x=CURLOPT_VERBOSE;
| if (x) {;}
|
| ;
| return 0;
| }
configure:5898: result: no
configure:5989: error: Missing required libcurl >= 7.15.2
标题位于/ usr / include / x86_64-linux-gnu / curl /中,我在/ usr / include / curl和/ usr / local / include / curl中进行符号链接。
我做过傻事吗?我错过了一步吗?
答案 0 :(得分:0)
您可能需要在编译时指定include目录。
要列出默认包含路径,您可以运行命令
# clang -xc -E -v -
这将列出搜索标题的位置。 E.g。
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc/x86_64-linux-gnu/7/include
/usr/local/include
/usr/lib/gcc/x86_64-linux-gnu/7/include-fixed
/usr/include/x86_64-linux-gnu
/usr/include
End of search list.
漂亮的工具pkg-config可以帮助您找到libcurl所需的路径。
# pkg-config --cflags libcurl
-I/usr/include/x86_64-linux-gnu
从这里我们看到你的路径被包含,但抱怨的编译器是aarch64-linux-android-clang。
可能的答案
尝试运行
# aarch64-linux-android-clang -xc -E -v -
并查看是否显示搜索到的路径不包含相关标题。您可能还需要为aarch64获取头文件(和libcurl)。
祝你好运!