记录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'

相关推荐
陈君豪1 分钟前
OpenCV的FAST和goodFeaturesToTrack的區別
linux
阿雄不会写代码10 分钟前
ubuntu安装nginx
linux·服务器·网络
chinayu200717 分钟前
虚拟机桥接模式
linux·运维·桥接模式
1LOVESJohnny21 分钟前
Linux | scp指令基于WSL在Windows/Ubuntu系统间传输文件
linux·ubuntu·wsl·文件传输
vvw&42 分钟前
如何在 Ubuntu 22.04 上安装 Graylog 开源日志管理平台
linux·运维·服务器·ubuntu·开源·github·graylog
大哥_ZH1 小时前
Linux umami在国产麒麟系统安装网站统计工具(只能上国内网站的系统)
linux·服务器
LuH11241 小时前
【论文阅读笔记】Scalable, Detailed and Mask-Free Universal Photometric Stereo
论文阅读·笔记
o(╥﹏╥)1 小时前
在 Ubuntu 上安装 VS Code
linux·运维·vscode·ubuntu·vs
不爱学英文的码字机器1 小时前
[Linux] Shell 命令及运行原理
linux·运维·服务器
cdut_suye2 小时前
Linux工具使用指南:从apt管理、gcc编译到makefile构建与gdb调试
java·linux·运维·服务器·c++·人工智能·python