openssl undefined reference to `SSLv2_client_method’

有运维或运维开发方面的需求,可以联系博主QQ 452336092或Email:admin#centos.bz(收费)

今天在Ubuntu 11.10编译php-5.2.17的时候出现如下的错误:

  1. php-5.2.17/ext/openssl/xp_ssl.c:357: undefined reference to `SSLv2_server_method'
  2. php-5.2.17/ext/openssl/xp_ssl.c:337: undefined reference to `SSLv2_client_method'
  3. collect2: ld returned 1 exit status
  4. make: *** [sapi/cgi/php-cgi] 错误 1

这个需要一个补丁禁用openssl的SSLv2_client_method,方法如下:

  1. cd php-5.2.17/
  2. wget https://www.centos.bz/wp-content/uploads/2012/06/debian_patches_disable_SSLv2_for_openssl_1_0_0.patch
  3. patch -p1 < debian_patches_disable_SSLv2_for_openssl_1_0_0.patch

然后再重新编译php

  1. make clean
  2. make && make install

转载请保留原文链接:Linux运维日志 » openssl undefined reference to `SSLv2_client_method’

打赏

如果此文对你有所帮助,请随意打赏鼓励作者^_^