use*_*333 7 php homebrew openssl osx-mavericks
我正在尝试从源代码编译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
Run Code Online (Sandbox Code Playgroud)
OpenSSL通过Brew安装.在PHP中包括像--with-openssl=/usr/local/Cellar/openssl/1.0.2c
PS之前尝试仅/usr用于OpenSSL但得到了同样的错误.
Makefile有一行EXTRA_LIBS,如:
EXTRA_LIBS = -lresolv -lmcrypt -lltdl -liconv-lm -lxml2 -lcurl -lssl -lcrypto
Run Code Online (Sandbox Code Playgroud)
删除所有出现的-lssl并-lcrypto添加完整路径libssl.dylib和libcrypto.dylib (brew链接openssl到/ usr/local/opt/openssl/lib /)
EXTRA_LIBS = -lresolv -lmcrypt /usr/local/opt/openssl/lib/libssl.dylib /usr/local/opt/openssl/lib/libcrypto.dylib -lltdl -liconv-lm -lxml2 -lcurl
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2184 次 |
| 最近记录: |