记录undefined reference to `SSLv3_client_method‘错误笔记

libcurl.a(libcurl_la-openssl.o): in function `ossl_connect_step1':

openssl.c:(.text+0x3ca8): undefined reference to `SSLv3_client_method'

我个人环境原因:编译选项指定了某个openssl目录,此目录下有libcrypto.a libssl.a

解决方法:删除这些-Lxxxx目录编译选项。

libcurl.a(libcurl_la-openssl.o): undefined reference to symbol 'X509_LOOKUP_file@@OPENSSL_1_1_0'

/usr/bin/ld: /usr/lib64/libcrypto.so.1.1: error adding symbols: DSO missing from command line

解决方法:增加 -lssl -lcrypto

以下的错误也是增加 -lssl -lcrypto

libcurl.a(libcurl_la-openssl.o): in function `Curl_ossl_shutdown':

openssl.c:(.text+0x182c): undefined reference to `SSL_free'

/usr/bin/ld: openssl.c:(.text+0x186c): undefined reference to `SSL_read'

/usr/bin/ld: openssl.c:(.text+0x187c): undefined reference to `SSL_get_error'

/usr/bin/ld: openssl.c:(.text+0x18c4): undefined reference to `SSL_get_shutdown'

/usr/bin/ld: openssl.c:(.text+0x1980): undefined reference to `SSL_shutdown'

/usr/bin/ld: ../../../linux/../os_public//Lib//libcurl.a(libcurl_la-openssl.o): in function `servercert':

openssl.c:(.text+0x1a78): undefined reference to `SSL_get_peer_certificate'

/usr/bin/ld: openssl.c:(.text+0x1e8c): undefined reference to `PEM_read_bio_X509'

/usr/bin/ld: openssl.c:(.text+0x1ee0): undefined reference to `SSL_get_verify_result'

/usr/bin/ld: openssl.c:(.text+0x1f1c): undefined reference to `X509_verify_cert_error_string'

/usr/bin/ld: openssl.c:(.text+0x201c): undefined reference to `SSL_get_peer_cert_chain'

/usr/bin/ld: openssl.c:(.text+0x24c0): undefined reference to `SSL_ctrl'

/usr/bin/ld: openssl.c:(.text+0x24e8): undefined reference to `OCSP_response_status'

/usr/bin/ld: openssl.c:(.text+0x24f8): undefined reference to `OCSP_response_get1_basic'

/usr/bin/ld: openssl.c:(.text+0x2510): undefined reference to `SSL_get_peer_cert_chain'

/usr/bin/ld: openssl.c:(.text+0x2520): undefined reference to `SSL_CTX_get_cert_store'

/usr/bin/ld: openssl.c:(.text+0x2534): undefined reference to `OCSP_basic_verify'

/usr/bin/ld: openssl.c:(.text+0x2560): undefined reference to `OCSP_resp_count'

/usr/bin/ld: openssl.c:(.text+0x2574): undefined reference to `OCSP_resp_get0'

/usr/bin/ld: openssl.c:(.text+0x2588): undefined reference to `OCSP_single_get0_status'

/usr/bin/ld: openssl.c:(.text+0x259c): undefined reference to `OCSP_check_validity'

/usr/bin/ld: openssl.c:(.text+0x25a8): undefined reference to `OCSP_cert_status_str'

/usr/bin/ld: openssl.c:(.text+0x29c8): undefined reference to `PEM_write_bio_X509'

/usr/bin/ld: openssl.c:(.text+0x2f3c): undefined reference to `OCSP_response_status_str'

/usr/bin/ld: openssl.c:(.text+0x303c): undefined reference to `X509_verify_cert_error_string'

/usr/bin/ld: openssl.c:(.text+0x306c): undefined reference to `OCSP_crl_reason_str'

/usr/bin/ld: ../../../linux/../os_public//Lib//libcurl.a(libcurl_la-openssl.o): in function `ossl_connect_step2':

openssl.c:(.text+0x3244): undefined reference to `SSL_connect'

/usr/bin/ld: openssl.c:(.text+0x325c): undefined reference to `SSL_get_error'

/usr/bin/ld: openssl.c:(.text+0x32c8): undefined reference to `SSL_get_verify_result'

/usr/bin/ld: openssl.c:(.text+0x337c): undefined reference to `SSL_version'

/usr/bin/ld: openssl.c:(.text+0x33e8): undefined reference to `SSL_get_current_cipher'

/usr/bin/ld: openssl.c:(.text+0x33f0): undefined reference to `SSL_CIPHER_get_name'

/usr/bin/ld: openssl.c:(.text+0x342c): undefined reference to `SSL_get0_alpn_selected'

/usr/bin/ld: openssl.c:(.text+0x359c): undefined reference to `X509_verify_cert_error_string'

/usr/bin/ld: ../../../linux/../os_public//Lib//libcurl.a(libcurl_la-openssl.o): in function `ossl_recv':

openssl.c:(.text+0x3708): undefined reference to `SSL_read'

/usr/bin/ld: openssl.c:(.text+0x373c): undefined reference to `SSL_get_error'

/usr/bin/ld: ../../../linux/../os_public//Lib//libcurl.a(libcurl_la-openssl.o): in function `ossl_connect_step1':

openssl.c:(.text+0x39c0): undefined reference to `TLS_client_method'

/usr/bin/ld: openssl.c:(.text+0x39ec): undefined reference to `SSL_CTX_free'

/usr/bin/ld: openssl.c:(.text+0x39fc): undefined reference to `SSL_CTX_new'

/usr/bin/ld: openssl.c:(.text+0x3a24): undefined reference to `SSL_CTX_ctrl'

/usr/bin/ld: openssl.c:(.text+0x3a98): undefined reference to `SSL_CTX_ctrl'

/usr/bin/ld: openssl.c:(.text+0x3ab0): undefined reference to `SSL_CTX_ctrl'

/usr/bin/ld: openssl.c:(.text+0x3ac8): undefined reference to `SSL_CTX_set_options'

/usr/bin/ld: openssl.c:(.text+0x3b50): undefined reference to `SSL_CTX_set_default_passwd_cb_userdata'

/usr/bin/ld: openssl.c:(.text+0x3b60): undefined reference to `SSL_CTX_set_default_passwd_cb'

/usr/bin/ld: openssl.c:(.text+0x3ca8): undefined reference to `SSLv3_client_method'

/usr/bin/ld: openssl.c:(.text+0x3eac): undefined reference to `SSL_CTX_ctrl'

/usr/bin/ld: openssl.c:(.text+0x3ef8): undefined reference to `SSL_CTX_ctrl'

/usr/bin/ld: openssl.c:(.text+0x3f1c): undefined reference to `SSL_CTX_set_next_proto_select_cb'

/usr/bin/ld: openssl.c:(.text+0x3fa8): undefined reference to `SSL_free'

/usr/bin/ld: openssl.c:(.text+0x3fe0): undefined reference to `SSL_CTX_set_ciphersuites'

/usr/bin/ld: openssl.c:(.text+0x4014): undefined reference to `SSL_CTX_set_post_handshake_auth'

/usr/bin/ld: openssl.c:(.text+0x404c): undefined reference to `SSL_CTX_get_cert_store'

/usr/bin/ld: openssl.c:(.text+0x4054): undefined reference to `X509_LOOKUP_file'

/usr/bin/ld: openssl.c:(.text+0x4074): undefined reference to `X509_load_crl_file'

/usr/bin/ld: openssl.c:(.text+0x409c): undefined reference to `SSL_CTX_get_cert_store'

/usr/bin/ld: openssl.c:(.text+0x40f0): undefined reference to `SSL_CTX_set_verify'

/usr/bin/ld: openssl.c:(.text+0x4118): undefined reference to `SSL_CTX_set_keylog_callback'

/usr/bin/ld: openssl.c:(.text+0x4138): undefined reference to `SSL_CTX_ctrl'

/usr/bin/ld: openssl.c:(.text+0x414c): undefined reference to `SSL_CTX_sess_set_new_cb'

/usr/bin/ld: openssl.c:(.text+0x41a4): undefined reference to `SSL_free'

/usr/bin/ld: openssl.c:(.text+0x41b0): undefined reference to `SSL_new'

/usr/bin/ld: openssl.c:(.text+0x41e8): undefined reference to `SSL_set_connect_state'

/usr/bin/ld: openssl.c:(.text+0x4238): undefined reference to `BIO_f_ssl'

/usr/bin/ld: openssl.c:(.text+0x4268): undefined reference to `SSL_set_bio'

/usr/bin/ld: openssl.c:(.text+0x4290): undefined reference to `SSL_CTX_set_cipher_list'

/usr/bin/ld: openssl.c:(.text+0x4318): undefined reference to `SSL_CTX_ctrl'

/usr/bin/ld: openssl.c:(.text+0x4334): undefined reference to `SSL_CTX_ctrl'

/usr/bin/ld: openssl.c:(.text+0x4350): undefined reference to `SSL_CTX_set_msg_callback'

/usr/bin/ld: openssl.c:(.text+0x4368): undefined reference to `SSL_CTX_ctrl'

/usr/bin/ld: openssl.c:(.text+0x43b8): undefined reference to `SSL_CTX_set_alpn_protos'

/usr/bin/ld: openssl.c:(.text+0x4468): undefined reference to `SSL_CTX_set_srp_username'

/usr/bin/ld: openssl.c:(.text+0x4488): undefined reference to `SSL_CTX_set_srp_password'

/usr/bin/ld: openssl.c:(.text+0x44d4): undefined reference to `SSL_CTX_set_cipher_list'

/usr/bin/ld: openssl.c:(.text+0x45a0): undefined reference to `SSL_CTX_load_verify_locations'

/usr/bin/ld: openssl.c:(.text+0x4654): undefined reference to `SSL_set_fd'

/usr/bin/ld: openssl.c:(.text+0x46ac): undefined reference to `SSL_CTX_use_certificate_chain_file'

/usr/bin/ld: openssl.c:(.text+0x4750): undefined reference to `SSL_ctrl'

/usr/bin/ld: openssl.c:(.text+0x479c): undefined reference to `SSL_ctrl'

/usr/bin/ld: openssl.c:(.text+0x47f0): undefined reference to `SSL_set_ex_data'

/usr/bin/ld: openssl.c:(.text+0x4808): undefined reference to `SSL_set_ex_data'

/usr/bin/ld: openssl.c:(.text+0x4844): undefined reference to `SSL_set_session'

/usr/bin/ld: openssl.c:(.text+0x4950): undefined reference to `SSL_CTX_use_certificate_file'

/usr/bin/ld: openssl.c:(.text+0x4a34): undefined reference to `SSL_CTX_get_cert_store'

/usr/bin/ld: openssl.c:(.text+0x4b14): undefined reference to `SSL_CTX_use_PrivateKey_file'

/usr/bin/ld: openssl.c:(.text+0x4b5c): undefined reference to `SSL_new'

/usr/bin/ld: openssl.c:(.text+0x4b68): undefined reference to `SSL_get_certificate'

/usr/bin/ld: openssl.c:(.text+0x4b80): undefined reference to `SSL_get_privatekey'

/usr/bin/ld: openssl.c:(.text+0x4b9c): undefined reference to `SSL_get_privatekey'

/usr/bin/ld: openssl.c:(.text+0x4bb4): undefined reference to `SSL_free'

/usr/bin/ld: openssl.c:(.text+0x4bbc): undefined reference to `SSL_CTX_check_private_key'

/usr/bin/ld: openssl.c:(.text+0x4c0c): undefined reference to `SSL_CTX_use_certificate'

/usr/bin/ld: openssl.c:(.text+0x4d8c): undefined reference to `SSL_CTX_use_PrivateKey'

/usr/bin/ld: openssl.c:(.text+0x4e18): undefined reference to `SSL_CTX_use_certificate'

/usr/bin/ld: openssl.c:(.text+0x4f40): undefined reference to `SSL_CTX_use_PrivateKey'

/usr/bin/ld: openssl.c:(.text+0x4fa0): undefined reference to `SSL_CTX_check_private_key'

/usr/bin/ld: openssl.c:(.text+0x4fc8): undefined reference to `SSL_CTX_add_client_CA'

/usr/bin/ld: openssl.c:(.text+0x4fe0): undefined reference to `SSL_CTX_ctrl'

相关推荐
pk_xz12345637 分钟前
Shell 脚本中变量和字符串的入门介绍
linux·运维·服务器
小珑也要变强40 分钟前
Linux之sed命令详解
linux·运维·服务器
海绵波波1071 小时前
Webserver(4.3)TCP通信实现
服务器·网络·tcp/ip
努力变厉害的小超超2 小时前
ArkTS中的组件基础、状态管理、样式处理、class语法以及界面渲染
笔记·鸿蒙
九河云3 小时前
AWS账号注册费用详解:新用户是否需要付费?
服务器·云计算·aws
Lary_Rock3 小时前
RK3576 LINUX RKNN SDK 测试
linux·运维·服务器
幺零九零零4 小时前
【计算机网络】TCP协议面试常考(一)
服务器·tcp/ip·计算机网络
云飞云共享云桌面5 小时前
8位机械工程师如何共享一台图形工作站算力?
linux·服务器·网络
Peter_chq5 小时前
【操作系统】基于环形队列的生产消费模型
linux·c语言·开发语言·c++·后端
一坨阿亮6 小时前
Linux 使用中的问题
linux·运维