废话不多说,直接上问题:

PHP和openssl extension都是最新版本的,标准步骤安装时候出现如下问题:

php:php-5.6.27

openssl:openssl-1.1.0e

================================

/root/software/php/php-5.6.27/ext/openssl/openssl.c:3536:31: error: dereferencing pointer to incomplete type
int len = BN_num_bytes(pkey->pkey._type->_name); \
^
/usr/local/openssl/include/openssl/bn.h:142:40: note: in definition of macro ‘BN_num_bytes’
# define BN_num_bytes(a) ((BN_num_bits(a)+7)/8)
^
/root/software/php/php-5.6.27/ext/openssl/openssl.c:3982:5: note: in expansion of macro ‘OPENSSL_PKEY_GET_BN’
OPENSSL_PKEY_GET_BN(dh, g);
^
/root/software/php/php-5.6.27/ext/openssl/openssl.c:3538:18: error: dereferencing pointer to incomplete type
BN_bn2bin(pkey->pkey._type->_name, (unsigned char*)str); \
^
/root/software/php/php-5.6.27/ext/openssl/openssl.c:3982:5: note: in expansion of macro ‘OPENSSL_PKEY_GET_BN’
OPENSSL_PKEY_GET_BN(dh, g);
^
/root/software/php/php-5.6.27/ext/openssl/openssl.c:3535:11: error: dereferencing pointer to incomplete type
if (pkey->pkey._type->_name != NULL) { \
^
/root/software/php/php-5.6.27/ext/openssl/openssl.c:3983:5: note: in expansion of macro ‘OPENSSL_PKEY_GET_BN’
OPENSSL_PKEY_GET_BN(dh, priv_key);
^
In file included from /usr/local/openssl/include/openssl/asn1.h:24:0,
from /usr/local/openssl/include/openssl/objects.h:916,
from /usr/local/openssl/include/openssl/evp.h:27,
from /root/software/php/php-5.6.27/ext/openssl/openssl.c:44:
/root/software/php/php-5.6.27/ext/openssl/openssl.c:3536:31: error: dereferencing pointer to incomplete type
int len = BN_num_bytes(pkey->pkey._type->_name); \
^
/usr/local/openssl/include/openssl/bn.h:142:40: note: in definition of macro ‘BN_num_bytes’
# define BN_num_bytes(a) ((BN_num_bits(a)+7)/8)
^
/root/software/php/php-5.6.27/ext/openssl/openssl.c:3983:5: note: in expansion of macro ‘OPENSSL_PKEY_GET_BN’
OPENSSL_PKEY_GET_BN(dh, priv_key);
^
/root/software/php

================================

在网上搜索了一圈,都没有答案。

于是打开代码看来一下,看来某些定义的头文件没有引用进来。

但如本人才疏学浅,对openssl没有整体的把握,所以就对比了之前的openssl版本,发现版本升级后,代码是有变化的。

具体细节大家可以自己去看。

解决办法就是:

把openssl的版本降级,我选择的是openssl-0.9.8v。

重新编译安装,就不会有编译错误了。

php 5.6 安装openssl extension 出现编译错误的更多相关文章

  1. Cordova - 安装camera插件之后编译错误解决方法!

    安装camera插件之后,编译出错,错误截图如下: 刚开始以为是AAPT编译导致的,尝试关闭AAPT编译选项,但是不行,认真看了一下编译出错信息,应该是缺少文件导致的,随后在对应的目录中加入了缺失的文 ...

  2. 解决Mac OS编译安装时出现 cannot find openssl's <evp.h> 错误的问题

    踩坑 最近通过pecl安装mongodb扩展时,提示以下错误 ...... configure: error: Cannot find OpenSSL's <evp.h> ...... 根 ...

  3. Windows编译安装OpenSSL

    windows下使用vs2008中的nmake编译安装openssl的脚本build.bat: echo off & color 0A :: 项目名称 set PROJECT=openssl ...

  4. PHP composer-setup安装遇到的openssl extension is missing

    问题描述: 安装完成php-7.1.17后,安装composer出现以下错误 [root@localhost src]# curl -sS https://getcomposer.org/instal ...

  5. ubuntu下安装 openssl&&编译运行测试代码

    检查是否已安装 openssl: sudo apt-get install openssl 如果已安装执行以下操作:sudo apt-get install libssl-devsudo apt-ge ...

  6. 编译与安装 OpenSSL

    编译与安装 OpenSSL prefix 是安装目录,openssldir 是配置文件目录,另外建议安装两次,shared 作用是生成动态连接库.linux版的OpenSSL下载地址为:https:/ ...

  7. 编译和安装openssl

    linux安装了Python3.7之后, pip不好用了,报错如下: pip is configured with locations that require TLS/SSL, however th ...

  8. Linux 安装OpenSSL出错的解决方法

    以前编译php没有 –with–openssl 现在要使用到 openssl ,phpinze扩展安装,但是在make时候报错 今天找这个在网上找了大半天,最后总结应该是php版本本身的问题,错误是p ...

  9. The openssl extension is missing, which means that secure HTTPS transfers are impossible

    执行命令:curl -sS https://getcomposer.org/installer | php报错如下Some settings on your machine make Composer ...

随机推荐

  1. 「LibreOJ β Round #4」求和

    https://loj.ac/problem/528 1            ,  d =1 μ(d)=   (-1)^k   ,  d=p1*p2*p3*^pk  pi为素数 0         ...

  2. 重构改善既有代码设计--重构手法14:Hide Delegate (隐藏委托关系)

    客户通过一个委托类来调用另一个对象.在服务类上建立客户所需的所有函数,用以隐藏委托关系. 动机:封装即使不是对象的最关机特性,也是最关机特性之一.“封装”意味着每个对象都应该少了解系统的其他部分.如此 ...

  3. SpringCloud(四)服务发现与消费:以ribbon为例

    说明: ribbon是spring-cloud中作为服务消费者的一种角色,客户端可以通过它来对服务提供者的服务进行消费, 比如本例中是服务提供者注册到注册中心,服务提供者提供了一个服务接口,返回一个h ...

  4. Redis实战(六)管道

    https://www.cnblogs.com/huangxincheng/p/6212406.html

  5. 关于NuGet

    一.NuGet是什么? NuGet是Microsoft开发平台的程序集包管理器,它由客户端工具和服务端站点组成,客户端工具提供给用户管理和安装/卸载软件程序包,以及打包和发布程序包到NuGet服务端站 ...

  6. 【CodeForces】889 C. Maximum Element 排列组合+动态规划

    [题目]C. Maximum Element [题意]给定n和k,定义一个排列是好的当且仅当存在一个位置i,满足对于所有的j=[1,i-1]&&[i+1,i+k]有a[i]>a[ ...

  7. 【BZOJ】3991: [SDOI2015]寻宝游戏 虚树+DFS序+set

    [题意]给定n个点的带边权树,对于树上存在的若干特殊点,要求任选一个点开始将所有特殊点走遍后返回.现在初始没有特殊点,m次操作每次增加或减少一个特殊点,求每次操作后的总代价.n,m<=10^5. ...

  8. c++都忘记了,看了看那本发黄的C++primer,还是要去翻下了

    char *s="string"和char s[]="string"的区别 void main() { char* pStr1 = "Hello!&q ...

  9. iOS7开发-Apple苹果iPhone开发Xcode官方文档翻译PDF下载地址(2014年2月19日更新版)

    //转载请注明出处--本文永久链接:http://www.cnblogs.com/ChenYilong/p/3496069.html     编号 iOS-Apple苹果官方文档翻译名称 博文链接地址 ...

  10. 下拉刷新和UITableView的section headerView冲突的原因分析与解决方案

    UITableView:下拉刷新和上拉加载更多 [转载请注明出处] 本文将说明具有多个section的UITableView在使用下拉刷新机制时会遇到的问题及其解决方案. 工程地址在帖子最下方,只需要 ...