【Linux学习笔记】编译curl with openssl

环境:Ubuntu16

0.Openssl的编译过程参考这里

1.下载源码

git clone https://github.com/curl/curl.git

2.在curl目录下生成configure文件

./buildconf

遇到下面两个错误:

错误1:提示没有autoconf,装一个

  sudo apt install autoconf

错误2:buildconf: libtoolize not found

  sudo apt install libtool

3.编译配置

./configure --with-ssl --disable-dict --disable-ftp --disable-imap \
--disable-ldap --disable-ldaps --disable-pop3 --disable-proxy \
--disable-rtsp --disable-smtp --disable-telnet --disable-tftp \
--disable-zlib --without-ca-bundle --without-gnutls --without-libidn \
--without-librtmp --without-libssh2 --without-nss --without-zlib

运行结果:
……
  curl version:     7.61.1-DEV
  Host setup:       x86_64-pc-linux-gnu
  Install prefix:   /usr/local
  Compiler:         gcc
  SSL support:      enabled (OpenSSL)
  SSH support:      no      (--with-libssh2)
  zlib support:     no      (--with-zlib)
  brotli support:   no      (--with-brotli)
  GSS-API support:  no      (--with-gssapi)
  TLS-SRP support:  enabled
  resolver:         POSIX threaded
  IPv6 support:     enabled
  Unix sockets support: enabled
  IDN support:      no      (--with-{libidn2,winidn})
  Build libcurl:    Shared=yes, Static=yes
  Built-in manual:  no      (--enable-manual)
  --libcurl option: enabled (--disable-libcurl-option)
  Verbose errors:   enabled (--disable-verbose)
  SSPI support:     no      (--enable-sspi)
  ca cert bundle:   no
  ca cert path:     no
  ca fallback:      no
  LDAP support:     no      (--enable-ldap / --with-ldap-lib / --with-lber-lib)
  LDAPS support:    no      (--enable-ldaps)
  RTSP support:     no      (--enable-rtsp)
  RTMP support:     no      (--with-librtmp)
  metalink support: no      (--with-libmetalink)
  PSL support:      no      (libpsl not found)
  HTTP2 support:    disabled (--with-nghttp2)
  Protocols:        FILE GOPHER HTTP HTTPS SMB SMBS
 

4.编译

make all
make install

5.验证

curl -V
curl 7.61.0 (x86_64-pc-linux-gnu) libcurl/7.61.0 OpenSSL/1.1.0i
Release-Date: 2018-07-11
Protocols: file gopher http https smb smbs 
Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL TLS-SRP UnixSockets HTTPS-proxy 

这里如果报错,还是需要手动执行以下ldconfig

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值