出錯資訊如下:
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.old: symbol(s) not found for architecture x86_64clang: error: linker command failed with exit code 1 (use -v to see invocation)make: *** [sapi/cli/php] Error 1
回複內容:
出錯資訊如下:
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.old: symbol(s) not found for architecture x86_64clang: error: linker command failed with exit code 1 (use -v to see invocation)make: *** [sapi/cli/php] Error 1
這個我也遇到過,需要修改Makefile
找到 EXTRA_LIBS 將 openssl 的相關庫都替換絕對路徑