【发布时间】:2016-03-28 13:50:00
【问题描述】:
我在尝试从源码编译PHP 5.6.10,遇到了如下问题:
Undefined symbols for architecture x86_64:
"_PKCS5_PBKDF2_HMAC", referenced from:
_zif_openssl_pbkdf2 in openssl.o
"_TLSv1_1_client_method", referenced from:
_php_openssl_setup_crypto in xp_ssl.o
"_TLSv1_1_server_method", referenced from:
_php_openssl_setup_crypto in xp_ssl.o
"_TLSv1_2_client_method", referenced from:
_php_openssl_setup_crypto in xp_ssl.o
"_TLSv1_2_server_method", referenced from:
_php_openssl_setup_crypto in xp_ssl.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libs/libphp5.bundle] Error 1
OpenSSL 是通过 Brew 安装的。在 PHP 中包括 --with-openssl=/usr/local/Cellar/openssl/1.0.2c
附:
在尝试将 /usr 用于 OpenSSL 之前,但遇到了同样的错误。
【问题讨论】:
-
能否提供平台详细信息和编译器信息?
-
@cyrbil 你到底需要什么?
-
你的操作系统版本
uname -smorv和你的编译器gcc --version(假设你使用gcc ...) -
@cyrbil 这是你的选择dropbox.com/s/ap129bv74les772/…
-
您能接受@Bob 的回答,因为它是正确的吗?谢谢
标签: php openssl homebrew osx-mavericks