alexcrichton / curl-rust

Rust bindings to libcurl
MIT License
1k stars 234 forks source link

failed to link in Ubuntu 20.04 #439

Open keepsimple1 opened 2 years ago

keepsimple1 commented 2 years ago

I'm using curl 0.4.42. My program built OK on macOS, but failed to build on Ubuntu 20.04 due to many linker errors:

Two examples are:

          /usr/include/openssl/x509.h:85: undefined reference to `OPENSSL_sk_num'
          /usr/include/openssl/x509.h:85: undefined reference to `OPENSSL_sk_value'

I installed libc6-dev, libssl-dev and libcurl4-openssl-dev, but did not resolve the errors. What are I missing to fix these linker errors? Thanks.

real-felix commented 2 years ago

I get the same kind of error on Fedora, even though I installed openssl-devel and libcurl-devel. Did you solve your issue?

undefined reference to `EVP_PKEY_id'
undefined reference to `SSL_get_peer_certificate'
undefined reference to `EVP_PKEY_id'
undefined reference to `SSL_get_peer_certificate'