curl不支持openssl的静态库,所以编译openssl的时候,应该加上shared 参数,记录一下我亲手编译的参数:

./configure --prefix=/usr/local/openssl shared zlib

shared 表示生成动态库

zlib 当然就是zlib了,这个库编译很容易,最好不要自行指定安装位置,因为别的软件安装的时候可能会从你指定的目录里头找不到zlib

接下来就是curl了,高版本的openssl(我用的是openssl-1.0.2e)不再导出V2版本的ssl函数,所以不能用低版本的curl+openssl-1.0.2e,至少curl-7.20.1是不能跟openssl-1.0.2e配合使用,所以我用了curl-7.46.0可以编译通过

export PKG_CONFIG_PATH=/usr/local/openssl/lib/pkgconfig

curl的帮助文档提到,如果系统安装有pkg-config就应该通过配置PKG_CONFIG_PATH让configure程序找到openssl否则curl找不到openssl就很麻烦,这是我踩过的坑,死活找不到openssl,整得我的微信后台都不正常

上参数:

./configure --prefix=/usr/local/libcurl7.46.0 --enable-http --enable-ftp --enable-file --enable-ldap --enable-ldaps --enable-dict --enable-proxy --with-ssl

顺便放上php的参数,另php编译oci扩展也比较麻烦,下次上

./configure '--prefix=/usr/local/php' '--enable-fpm' '--enable-mbstring' '--enable-soap' '--enable-bcmath' '--enable-sockets' '--enable-zip' '--with-openssl=/usr/local/openssl' '--with-libxml-dir=/usr/local/libxml2' '--with-curl=/usr/local/libcurl7.46.0' '--with-pcre-dir=/usr/local/pcre' '--with-zlib-dir=/usr/local/zlib' '--with-freetype-dir=/usr/local/freetype2' '--with-png-dir=/usr/local/libpng' '--with-jpeg-dir=/usr/local/jpeg' '--with-gd=/usr/local/libgd' '--with-xpm-dir=/usr/local/libxpm' '--with-mysql' '--with-mysqli'

curl+openssl编译的更多相关文章

  1. OpenSSl编译

    1.下载openssl代码,下载地址:http://www.openssl.org/source/ ,如果使用winrar解压失败的话(提示不能创建符号链接),可以关闭UAC.2.下载安装Active ...

  2. openssl编译时!遇见的问题

    openssl编译: 1.编译静态库 ./config --prefix=/root/openssl/soft make 2.编译动态库 ./config --prefix=/root/openssl ...

  3. Qt开发笔记:OpenSSL库介绍、windows上mingw32版本的OpenSSL编译模块化

    前言   Windows上mingw32版本的openssl的编译是属于比较棘手的,OpenSSL本身不提供支持..   OpenSSL 介绍   OpenSSL是一个开放源代码的软件库包,应用程序可 ...

  4. libcurl库openssl编译

    openssl编译 win32: perl Configure  no-shared VC-WIN32 --prefix=E:/lib/openssl-1.1.1 linux: ./config -f ...

  5. Curl的编译

    下载 curl的官网:https://curl.haxx.se/ libcurl就是一个库,curl就是使用libcurl实现的. curl是一个exe,也可以说是整个项目的名字,而libcurl就是 ...

  6. lua curl动态链接库编译安装

    关于lua curl的资料网上并不是很多.找来找去就那么几个,所以我绝得很有必要把我的经验记下来,以防下次忘记                                              ...

  7. openssl编译(VC6.0)

    官网:http://www.openssl.org/ 得到源码: git clone  https://github.com/openssl/openssl 一.用vc编译器编译: 1.下载nasm: ...

  8. linux 下 openssl 编译和交叉编译

    此随便记录一下编译openssl时遇到的各种问题以及解决办法. 点击此处下载 OpenSSL(version-1.0.1e) linux 64位系统编译32位版本: setarch i386 ./Co ...

  9. windows下openssl编译

    昨晚,在编译rabbitmq-c时,使用cmake生成vs项目文件时遇到下列错误: CMake Error at C:/Program Files/CMake/share/cmake-3.6/Modu ...

随机推荐

  1. kettle定时任务_第三方合作方有订单自动发送邮件通知_20161214

    由于和第三方合作,需要知道第三方合作方有了订单后通知对方,如果每天查看数据太麻烦了,因此想到了用Kettle定时任务,先判断系统里有没有订单,如果有就执行查询调取订单数据并发送邮件作业,如果没有则不执 ...

  2. Python语法三

    1. from os.path import exists import 了又一个很好用的命令 exists.这个命令将文件名字符串作为参 数,如果文件存在的话,它将返回 True,否则将返回 Fal ...

  3. vue-cli webpack 引入jquery

    首先在package.json里的dependencies加入"jquery" : "^2.2.3",然后install 在webpack.base.conf. ...

  4. jquery template模版引擎

    jTemplates http://jtemplates.tpython.com/ jquery-template  https://github.com/codepb/jquery-template ...

  5. js 赋值 要用 toString() ; 太坑了。

    js 赋值 要用 toString() ;     太坑了. js 赋值 要用 toString() ;     太坑了. js 赋值 要用 toString() ;     太坑了.

  6. java.util.regex.PatternSyntaxException: Dangling meta character '*' near index 0

    使用repalceAll 方法出现java.util.regex.PatternSyntaxException: Dangling meta character '*' near index 0异常 ...

  7. 刚看到的感觉会用的到 收藏一下 常用的iOS第三方资源 (转)

    原文出处:http://blog.csdn.net/ruiwang321/article/details/50591888 一:第三方插件 1:基于响应式编程思想的oc 地址:https://gith ...

  8. 如何把apdu[decode_len]打印出来

    memcpy(data, &apdu[decode_len], apdu_len - decode_len);    int i = 0;    for(i=0;i<apdu_len;i ...

  9. nginx + lua + redis 防黑IP

    lua脚本 local redis = require "resty.redis" local red = redis.new() red.connect(red, '127.0. ...

  10. matlab 连续读取多个文件

    方法1: 把文件的文件名按一定的规律命名,假如:filename1.txt,filename2.txt,...,fielname100.txt,在读取的时候则可以使用循环: for i = 1:100 ...