Я пишу модуль в Nginx и планирую использовать libcurl
, чтобы сделать несколько вызовов покоя в модуле и выполнить некоторую обработку с выводом. Поэтому я попытался настроить и собрать / установить nginx с помощью libcurl.
Вот что я сделал,
>> /configure --with-pcre=../pcre-8.41/ --with-http_ssl_module --with-openssl=/usr/local/src/openssl-1.1.0g --add-module=/usr/local/src/ngxmodules/rest_easy/ --with-cc-opt="-I /usr/local/include -lcurl"
и >> sudo make
Ошибка make с указанной ниже ошибкой
Undefined symbols for architecture x86_64:
"_CRYPTO_add_lock", referenced from:
_ngx_ssl_stapling in ngx_event_openssl_stapling.o
"_ENGINE_cleanup", referenced from:
_ngx_openssl_exit in ngx_event_openssl.o
"_EVP_MD_CTX_create", referenced from:
_ngx_ssl_session_cache in ngx_event_openssl.o
"_EVP_MD_CTX_destroy", referenced from:
_ngx_ssl_session_cache in ngx_event_openssl.o
"_EVP_cleanup", referenced from:
_ngx_openssl_exit in ngx_event_openssl.o
"_OPENSSL_add_all_algorithms_noconf", referenced from:
_ngx_ssl_init in ngx_event_openssl.o
"_SSL_CTX_get_ex_new_index", referenced from:
_ngx_ssl_init in ngx_event_openssl.o
"_SSL_CTX_set_tmp_rsa_callback", referenced from:
_ngx_ssl_ciphers in ngx_event_openssl.o
"_SSL_get_ex_new_index", referenced from:
_ngx_ssl_init in ngx_event_openssl.o
"_SSL_library_init", referenced from:
_ngx_ssl_init in ngx_event_openssl.o
"_SSL_load_error_strings", referenced from:
_ngx_ssl_init in ngx_event_openssl.o
"_SSL_state", referenced from:
_ngx_ssl_shutdown in ngx_event_openssl.o
"_SSLeay_version", referenced from:
_main in nginx.o
"_SSLv23_method", referenced from:
_ngx_ssl_create in ngx_event_openssl.o
"_X509_get_ex_new_index", referenced from:
_ngx_ssl_init in ngx_event_openssl.o
"_curl_easy_cleanup", referenced from:
_ngx_http_signals_s2s_handler in ngx_http_signals_s2s_module.o
"_curl_easy_init", referenced from:
_ngx_http_signals_s2s_handler in ngx_http_signals_s2s_module.o
"_curl_easy_perform", referenced from:
_ngx_http_signals_s2s_handler in ngx_http_signals_s2s_module.o
"_curl_easy_setopt", referenced from:
_ngx_http_signals_s2s_handler in ngx_http_signals_s2s_module.o
"_curl_easy_strerror", referenced from:
_ngx_http_signals_s2s_handler in ngx_http_signals_s2s_module.o
"_sk_num", referenced from:
_ngx_ssl_session_cache in ngx_event_openssl.o
_ngx_ssl_stapling in ngx_event_openssl_stapling.o
(maybe you meant: _OPENSSL_sk_num)
"_sk_value", referenced from:
_ngx_ssl_session_cache in ngx_event_openssl.o
_ngx_ssl_stapling in ngx_event_openssl_stapling.o
(maybe you meant: _OPENSSL_sk_value)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [objs/nginx] Error 1
make: *** [build] Error 2
Как правильно включить / установить библиотеки libcurl с помощью nginx, чтобы я мог использовать их в своих модулях?