php-5.2.6安装,php5.2.6安装openssl.o扩展,make时报错?

问题:

调试支付宝支付时报错:Fatal error: Call to undefined function openssl_get_privatekey()`

在网上查了 说是没有安装openssl.so扩展。

通过 phpize安装扩展,但是make时报错:

/bin/sh /opt/php-5.2.6/ext/openssl/libtool --mode=compile gcc -I. -I/opt/php-5.2.6/ext/openssl -DPHP_ATOM_INC -I/opt/php-5.2.6/ext/openssl/include -I/opt/php-5.2.6/ext/openssl/main -I/opt/php-5.2.6/ext/openssl -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /opt/php-5.2.6/ext/openssl/openssl.c -o openssl.lo

mkdir .libs

gcc -I. -I/opt/php-5.2.6/ext/openssl -DPHP_ATOM_INC -I/opt/php-5.2.6/ext/openssl/include -I/opt/php-5.2.6/ext/openssl/main -I/opt/php-5.2.6/ext/openssl -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /opt/php-5.2.6/ext/openssl/openssl.c -fPIC -DPIC -o .libs/openssl.o

/opt/php-5.2.6/ext/openssl/openssl.c:229: error: expected specifier-qualifier-list before 'LHASH'

/opt/php-5.2.6/ext/openssl/openssl.c:410: error: expected declaration specifiers or '...' before 'LHASH'

/opt/php-5.2.6/ext/openssl/openssl.c: In function 'php_openssl_config_check_syntax':

/opt/php-5.2.6/ext/openssl/openssl.c:416: error: 'config' undeclared (first use in this function)

/opt/php-5.2.6/ext/openssl/openssl.c:416: error: (Each undeclared identifier is reported only once

/opt/php-5.2.6/ext/openssl/openssl.c:416: error: for each function it appears in.)

/opt/php-5.2.6/ext/openssl/openssl.c: In function 'add_oid_section':

/opt/php-5.2.6/ext/openssl/openssl.c:435: error: 'struct php_x509_request' has no member named 'req_config'

/opt/php-5.2.6/ext/openssl/openssl.c:439: error: 'struct php_x509_request' has no member named 'req_config'

/opt/php-5.2.6/ext/openssl/openssl.c: In function 'php_openssl_parse_config':

/opt/php-5.2.6/ext/openssl/openssl.c:485: error: 'struct php_x509_request' has no member named 'config_filename'

/opt/php-5.2.6/ext/openssl/openssl.c:485: error: 'struct php_x509_request' has no member named 'config_filename'

/opt/php-5.2.6/ext/openssl/openssl.c:486: error: 'struct php_x509_request' has no member named 'section_name'

/opt/php-5.2.6/ext/openssl/openssl.c:486: error: 'struct php_x509_request' has no member named 'section_name'

/opt/php-5.2.6/ext/openssl/openssl.c:487: error: 'struct php_x509_request' has no member named 'global_config'

/opt/php-5.2.6/ext/openssl/openssl.c:488: error: 'struct php_x509_request' has no member named 'req_config'

/opt/php-5.2.6/ext/openssl/openssl.c:488: error: 'struct php_x509_request' has no member named 'config_filename'

/opt/php-5.2.6/ext/openssl/openssl.c:490: error: 'struct php_x509_request' has no member named 'req_config'

/opt/php-5.2.6/ext/openssl/openssl.c:495: error: 'struct php_x509_request' has no member named 'req_config'

/opt/php-5.2.6/ext/openssl/openssl.c:506: error: 'struct php_x509_request' has no member named 'digest_name'

/opt/php-5.2.6/ext/openssl/openssl.c:506: error: 'struct php_x509_request' has no member named 'digest_name'

/opt/php-5.2.6/ext/openssl/openssl.c:506: error: 'struct php_x509_request' has no member named 'req_config'

/opt/php-5.2.6/ext/openssl/openssl.c:506: error: 'struct php_x509_request' has no member named 'section_name'

/opt/php-5.2.6/ext/openssl/openssl.c:508: error: 'struct php_x509_request' has no member named 'extensions_section'

/opt/php-5.2.6/ext/openssl/openssl.c:508: error: 'struct php_x509_request' has no member named 'extensions_section'

/opt/php-5.2.6/ext/openssl/openssl.c:508: error: 'struct php_x509_request' has no member named 'req_config'

/opt/php-5.2.6/ext/openssl/openssl.c:508: error: 'struct php_x509_request' has no member named 'section_name'

/opt/php-5.2.6/ext/openssl/openssl.c:510: error: 'struct php_x509_request' has no member named 'request_extensions_section'

/opt/php-5.2.6/ext/openssl/openssl.c:510: error: 'struct php_x509_request' has no member named 'request_extensions_section'

/opt/php-5.2.6/ext/openssl/openssl.c:510: error: 'struct php_x509_request' has no member named 'req_config'

/opt/php-5.2.6/ext/openssl/openssl.c:510: error: 'struct php_x509_request' has no member named 'section_name'

/opt/php-5.2.6/ext/openssl/openssl.c:512: error: 'struct php_x509_request' has no member named 'priv_key_bits'

/opt/php-5.2.6/ext/openssl/openssl.c:512: error: 'struct php_x509_request' has no member named 'priv_key_bits'

/opt/php-5.2.6/ext/openssl/openssl.c:512: error: 'struct php_x509_request' has no member named 'req_config'

/opt/php-5.2.6/ext/openssl/openssl.c:512: error: 'struct php_x509_request' has no member named 'section_name'

/opt/php-5.2.6/ext/openssl/openssl.c:515: error: 'struct php_x509_request' has no member named 'priv_key_type'

/opt/php-5.2.6/ext/openssl/openssl.c:515: error: 'struct php_x509_request' has no member named 'priv_key_type'

/opt/php-5.2.6/ext/openssl/openssl.c:518: error: 'struct php_x509_request' has no member named 'priv_key_encrypt'

/opt/php-5.2.6/ext/openssl/openssl.c:520: error: 'struct php_x509_request' has no member named 'req_config'

/opt/php-5.2.6/ext/openssl/openssl.c:520: error: 'struct php_x509_request' has no member named 'section_name'

/opt/php-5.2.6/ext/openssl/openssl.c:522: error: 'struct php_x509_request' has no member named 'req_config'

/opt/php-5.2.6/ext/openssl/openssl.c:522: error: 'struct php_x509_request' has no member named 'section_name'

/opt/php-5.2.6/ext/openssl/openssl.c:525: error: 'struct php_x509_request' has no member named 'priv_key_encrypt'

/opt/php-5.2.6/ext/openssl/openssl.c:527: error: 'struct php_x509_request' has no member named 'priv_key_encrypt'

/opt/php-5.2.6/ext/openssl/openssl.c:532: error: 'struct php_x509_request' has no member named 'digest_name'

/opt/php-5.2.6/ext/openssl/openssl.c:533: error: 'struct php_x509_request' has no member named 'digest_name'

/opt/php-5.2.6/ext/openssl/openssl.c:533: error: 'struct php_x509_request' has no member named 'req_config'

/opt/php-5.2.6/ext/openssl/openssl.c:533: error: 'struct php_x509_request' has no member named 'section_name'

/opt/php-5.2.6/ext/openssl/openssl.c:535: error: 'struct php_x509_request' has no member named 'digest_name'

/opt/php-5.2.6/ext/openssl/openssl.c:536: error: 'struct php_x509_request' has no member named 'digest'

/opt/php-5.2.6/ext/openssl/openssl.c:536: error: 'struct php_x509_request' has no member named 'md_alg'

/opt/php-5.2.6/ext/openssl/openssl.c:536: error: 'struct php_x509_request' has no member named 'digest_name'

/opt/php-5.2.6/ext/openssl/openssl.c:538: error: 'struct php_x509_request' has no member named 'md_alg'

/opt/php-5.2.6/ext/openssl/openssl.c:539: error: 'struct php_x509_request' has no member named 'md_alg'

/opt/php-5.2.6/ext/openssl/openssl.c:539: error: 'struct php_x509_request' has no member named 'digest'

/opt/php-5.2.6/ext/openssl/openssl.c:542: error: 'struct php_x509_request' has no member named 'extensions_section'

/opt/php-5.2.6/ext/openssl/openssl.c:542: error: 'struct php_x509_request' has no member named 'config_filename'

/opt/php-5.2.6/ext/openssl/openssl.c:542: error: 'struct php_x509_request' has no member named 'extensions_section'

/opt/php-5.2.6/ext/openssl/openssl.c:542: error: 'struct php_x509_request' has no member named 'req_config'

/opt/php-5.2.6/ext/openssl/openssl.c:542: error: too many arguments to function 'php_openssl_config_check_syntax'

/opt/php-5.2.6/ext/openssl/openssl.c:545: error: 'struct php_x509_request' has no member named 'req_config'

/opt/php-5.2.6/ext/openssl/openssl.c:545: error: 'struct php_x509_request' has no member named 'section_name'

/opt/php-5.2.6/ext/openssl/openssl.c:551: error: 'struct php_x509_request' has no member named 'request_extensions_section'

/opt/php-5.2.6/ext/openssl/openssl.c:551: error: 'struct php_x509_request' has no member named 'config_filename'

/opt/php-5.2.6/ext/openssl/openssl.c:551: error: 'struct php_x509_request' has no member named 'request_extensions_section'

/opt/php-5.2.6/ext/openssl/openssl.c:551: error: 'struct php_x509_request' has no member named 'req_config'

/opt/php-5.2.6/ext/openssl/openssl.c:551: error: too many arguments to function 'php_openssl_config_check_syntax'

/opt/php-5.2.6/ext/openssl/openssl.c: In function 'php_openssl_dispose_config':

/opt/php-5.2.6/ext/openssl/openssl.c:559: error: 'struct php_x509_request' has no member named 'priv_key'

/opt/php-5.2.6/ext/openssl/openssl.c:560: error: 'struct php_x509_request' has no member named 'priv_key'

/opt/php-5.2.6/ext/openssl/openssl.c:561: error: 'struct php_x509_request' has no member named 'priv_key'

/opt/php-5.2.6/ext/openssl/openssl.c:563: error: 'struct php_x509_request' has no member named 'global_config'

/opt/php-5.2.6/ext/openssl/openssl.c:564: error: 'struct php_x509_request' has no member named 'global_config'

/opt/php-5.2.6/ext/openssl/openssl.c:565: error: 'struct php_x509_request' has no member named 'global_config'

/opt/php-5.2.6/ext/openssl/openssl.c:567: error: 'struct php_x509_request' has no member named 'req_config'

/opt/php-5.2.6/ext/openssl/openssl.c:568: error: 'struct php_x509_request' has no member named 'req_config'

/opt/php-5.2.6/ext/openssl/openssl.c:569: error: 'struct php_x509_request' has no member named 'req_config'

/opt/php-5.2.6/ext/openssl/openssl.c: In function 'php_openssl_x509_from_zval':

/opt/php-5.2.6/ext/openssl/openssl.c:862: warning: passing argument 1 of 'PEM_ASN1_read_bio' from incompatible pointer type

/usr/include/openssl/pem.h:417: note: expected 'void * (*)(void **, const unsigned char **, long int)' but argument is of type 'char * (*)()'

/opt/php-5.2.6/ext/openssl/openssl.c: In function 'php_openssl_make_REQ':

/opt/php-5.2.6/ext/openssl/openssl.c:1673: error: 'struct php_x509_request' has no member named 'req_config'

/opt/php-5.2.6/ext/openssl/openssl.c:1673: error: 'struct php_x509_request' has no member named 'section_name'

/opt/php-5.2.6/ext/openssl/openssl.c:1677: error: 'struct php_x509_request' has no member named 'req_config'

/opt/php-5.2.6/ext/openssl/openssl.c:1681: error: 'struct php_x509_request' has no member named 'req_config'

/opt/php-5.2.6/ext/openssl/openssl.c:1681: error: 'struct php_x509_request' has no member named 'section_name'

/opt/php-5.2.6/ext/openssl/openssl.c:1685: error: 'struct php_x509_request' has no member named 'req_config'

/opt/php-5.2.6/ext/openssl/openssl.c:1816: error: 'struct php_x509_request' has no member named 'priv_key'

/opt/php-5.2.6/ext/openssl/openssl.c: In function 'zif_openssl_csr_sign':

/opt/php-5.2.6/ext/openssl/openssl.c:2044: error: 'struct php_x509_request' has no member named 'extensions_section'

/opt/php-5.2.6/ext/openssl/openssl.c:2048: error: 'struct php_x509_request' has no member named 'req_config'

/opt/php-5.2.6/ext/openssl/openssl.c:2049: error: 'struct php_x509_request' has no member named 'req_config'

/opt/php-5.2.6/ext/openssl/openssl.c:2049: error: 'struct php_x509_request' has no member named 'extensions_section'

/opt/php-5.2.6/ext/openssl/openssl.c:2055: error: 'struct php_x509_request' has no member named 'digest'

/opt/php-5.2.6/ext/openssl/openssl.c: In function 'zif_openssl_csr_new':

/opt/php-5.2.6/ext/openssl/openssl.c:2110: error: 'struct php_x509_request' has no member named 'priv_key'

/opt/php-5.2.6/ext/openssl/openssl.c:2111: error: 'struct php_x509_request' has no member named 'priv_key'

/opt/php-5.2.6/ext/openssl/openssl.c:2115: error: 'struct php_x509_request' has no member named 'priv_key'

/opt/php-5.2.6/ext/openssl/openssl.c:2118: error: 'struct php_x509_request' has no member named 'priv_key'

/opt/php-5.2.6/ext/openssl/openssl.c:2127: error: 'struct php_x509_request' has no member named 'req_config'

/opt/php-5.2.6/ext/openssl/openssl.c:2130: error: 'struct php_x509_request' has no member named 'request_extensions_section'

/opt/php-5.2.6/ext/openssl/openssl.c:2130: error: 'struct php_x509_request' has no member named 'req_config'

/opt/php-5.2.6/ext/openssl/openssl.c:2131: error: 'struct php_x509_request' has no member named 'request_extensions_section'

/opt/php-5.2.6/ext/openssl/openssl.c:2133: error: 'struct php_x509_request' has no member named 'request_extensions_section'

/opt/php-5.2.6/ext/openssl/openssl.c:2137: error: 'struct php_x509_request' has no member named 'priv_key'

/opt/php-5.2.6/ext/openssl/openssl.c:2137: error: 'struct php_x509_request' has no member named 'digest'

/opt/php-5.2.6/ext/openssl/openssl.c:2147: error: 'struct php_x509_request' has no member named 'priv_key'

/opt/php-5.2.6/ext/openssl/openssl.c:2148: error: 'struct php_x509_request' has no member named 'priv_key'

/opt/php-5.2.6/ext/openssl/openssl.c:2150: error: 'struct php_x509_request' has no member named 'priv_key'

/opt/php-5.2.6/ext/openssl/openssl.c:2157: error: 'struct php_x509_request' has no member named 'priv_key'

/opt/php-5.2.6/ext/openssl/openssl.c: In function 'php_openssl_generate_private_key':

/opt/php-5.2.6/ext/openssl/openssl.c:2406: error: 'struct php_x509_request' has no member named 'priv_key_bits'

/opt/php-5.2.6/ext/openssl/openssl.c:2408: error: 'struct php_x509_request' has no member named 'priv_key_bits'

/opt/php-5.2.6/ext/openssl/openssl.c:2412: error: 'struct php_x509_request' has no member named 'req_config'

/opt/php-5.2.6/ext/openssl/openssl.c:2412: error: 'struct php_x509_request' has no member named 'section_name'

/opt/php-5.2.6/ext/openssl/openssl.c:2415: error: 'struct php_x509_request' has no member named 'priv_key'

/opt/php-5.2.6/ext/openssl/openssl.c:2416: error: 'struct php_x509_request' has no member named 'priv_key_type'

/opt/php-5.2.6/ext/openssl/openssl.c:2418: error: 'struct php_x509_request' has no member named 'priv_key'

/opt/php-5.2.6/ext/openssl/openssl.c:2418: error: 'struct php_x509_request' has no member named 'priv_key_bits'

/opt/php-5.2.6/ext/openssl/openssl.c:2419: error: 'struct php_x509_request' has no member named 'priv_key'

/opt/php-5.2.6/ext/openssl/openssl.c:2425: error: 'struct php_x509_request' has no member named 'priv_key_bits'

/opt/php-5.2.6/ext/openssl/openssl.c:2429: error: 'struct php_x509_request' has no member named 'priv_key'

/opt/php-5.2.6/ext/openssl/openssl.c:2430: error: 'struct php_x509_request' has no member named 'priv_key'

/opt/php-5.2.6/ext/openssl/openssl.c:2447: error: 'struct php_x509_request' has no member named 'priv_key'

/opt/php-5.2.6/ext/openssl/openssl.c:2448: error: 'struct php_x509_request' has no member named 'priv_key'

/opt/php-5.2.6/ext/openssl/openssl.c: In function 'zif_openssl_pkey_new':

/opt/php-5.2.6/ext/openssl/openssl.c:2521: error: 'struct php_x509_request' has no member named 'priv_key'

/opt/php-5.2.6/ext/openssl/openssl.c:2523: error: 'struct php_x509_request' has no member named 'priv_key'

/opt/php-5.2.6/ext/openssl/openssl.c: In function 'zif_openssl_pkey_export_to_file':

/opt/php-5.2.6/ext/openssl/openssl.c:2564: error: 'struct php_x509_request' has no member named 'priv_key_encrypt'

/opt/php-5.2.6/ext/openssl/openssl.c: In function 'zif_openssl_pkey_export':

/opt/php-5.2.6/ext/openssl/openssl.c:2615: error: 'struct php_x509_request' has no member named 'priv_key_encrypt'

make: *** [openssl.lo] Error 1

在网上查了好久,基本没有给出解决办法,就是让重新安装一个PHP。

有没有其它的不安装PHP的方法。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值