AARCH64-linux-gnu交叉编译curl

由于项目编译需要使用curl做http请求,所以需要交叉编译curl与openssl;openssl编译看我主页有相关操作;

用的是版本curl-7.79.1,openSSL版本openssl-1.0.2u;

1.下载好curl-7.79.1源码后解压

2.cd curl-7.79.1

3.配置configure  注意这个 --with-openssl路径需要精确到openssl编译好的根目录
./configure --host=aarch64-linux-gnu --prefix=/home/sun/Desktop/VScode/path --with-ssl=/home/sun/Desktop/VScode/openssl/path CPPFLAGS="-I/home/sun/Desktop/VScode/openssl/path/include" LDFLAGS="-L/home/sun/Desktop/VScode/openssl/path/lib" LIBS="-lssl -lcrypto"

4.make

5.make install

步骤三出现以下内容说明配置正确

configure: Configured to build curl/libcurl:

  Host setup:       aarch64-unknown-linux-gnu
  Install prefix:   /home/sun/Desktop/VScode/path
  Compiler:         aarch64-linux-gnu-gcc
   CFLAGS:          -Werror-implicit-function-declaration -O2 -Wno-system-headers -pthread
   CPPFLAGS:        -isystem /home/sun/Desktop/VScode/openssl/path/include -isystem /usr/local/include
   LDFLAGS:         -L/home/sun/Desktop/VScode/openssl/path/lib -L/usr/local/lib
   LIBS:            -lssl -lcrypto -lssl -lcrypto -lssl -lcrypto

  curl version:     7.79.1
  SSL:              enabled (OpenSSL)
  SSH:              no      (--with-{libssh,libssh2})
  zlib:             no      (--with-zlib)
  brotli:           no      (--with-brotli)
  zstd:             no      (--with-zstd)
  GSS-API:          no      (--with-gssapi)
  GSASL:            no      (libgsasl not found)
  TLS-SRP:          enabled
  resolver:         POSIX threaded
  IPv6:             enabled
  Unix sockets:     enabled
  IDN:              no      (--with-{libidn2,winidn})
  Build libcurl:    Shared=yes, Static=yes
  Built-in manual:  enabled
  --libcurl option: enabled (--disable-libcurl-option)
  Verbose errors:   enabled (--disable-verbose)
  Code coverage:    disabled
  SSPI:             no      (--enable-sspi)
  ca cert bundle:   no
  ca cert path:     no
  ca fallback:      no
  LDAP:             no      (--enable-ldap / --with-ldap-lib / --with-lber-lib)
  LDAPS:            no      (--enable-ldaps)
  RTSP:             enabled
  RTMP:             no      (--with-librtmp)
  PSL:              no      (libpsl not found)
  Alt-svc:          enabled (--disable-alt-svc)
  HSTS:             enabled (--disable-hsts)
  HTTP1:            enabled (internal)
  HTTP2:            no      (--with-nghttp2, --with-hyper)
  HTTP3:            no      (--with-ngtcp2, --with-quiche)
  ECH:              no      (--enable-ech)
  Protocols:        DICT FILE FTP FTPS GOPHER GOPHERS HTTP HTTPS IMAP IMAPS MQTT POP3 POP3S RTSP SMB SMBS SMTP SMTPS TELNET TFTP
  Features:         AsynchDNS HSTS HTTPS-proxy IPv6 Largefile NTLM NTLM_WB SSL TLS-SRP UnixSockets alt-svc

然后再执行make和make install

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

有灰机诶

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值