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. solrCloud的两种部署方式

    solrcloud 的部署其实有两种方式可选,那么我们在实践开发中应该怎样选择呢? 第一种:当启动solr服务器时,内嵌的启动一个Zookeeper服务器,然后将这些内嵌的Zookeeper服务器组成 ...

  2. nginx performance monitor

    nginx performance monitor Nginx中的stub_status模块主要用于查看Nginx的一些状态信息 示例 Active connections: 2 server acc ...

  3. type

    MollyPages.org"You were wrong case.To live here is to live." Home Pages / Database / Forms ...

  4. [转] --- Error: “A field or property with the name was not found on the selected data source” get only on server

    Error: “A field or property with the name was not found on the selected data source” get only on ser ...

  5. Storm-隔离调度器

    这个版本的亮点是新的“隔离调度器”,使得在一些拓扑中分享集群变得简单和安全.隔离调度程序允许您指定哪些拓扑应该“孤立”, 这意味着它们运行在集群中的一组专用的机器,没有其他的拓扑将运行.这些孤立的拓扑 ...

  6. UIButton中setTitleEdgeInsets和setImageEdgeInsets的使用

    UIButton内有两个控件titleLabel和imageView,可以用来显示一个文本和图片,这里的图片区别于背景图片.给UIButton设 置了title和image后,它们会图片在左边,文本在 ...

  7. Setup Factory 关闭正在运行的程序

    --在全局函数中增加 适用用Setup Factory 9 function FindAndCloseProcessByName(strName)  local tblProcesses = Wind ...

  8. 重复数据分析的三个常用语法distinct, group by, partition by

    由于数据经常会出现重复现象,数据去重是数据分析中常用操作之一,而distinct,group by, partition by三者都可以实现去重功能,实践中需要根据不同的场景需求来选取相应的语法. d ...

  9. modelsim无法识别include文件的解决方法

    modelsim发现include关联的文件编译报语法错误,文件名需要写绝对路径,即使这个文件和工程其它文件在一个目录上.例如只写成 `include "c0_ddr3_model_para ...

  10. hashchange事件的认识

    写过路由的同学都知道其原理是通过URL的改变,由导航信息来决定页面信息...表述的好像有点不准确 这么说吧,只要URL参数列表只要变化就会调用hashchange事件,此时event对象包括oldUR ...