Open samuela opened 5 months ago
I'm also able to reproduce the same behavior on Ubuntu 22.04
Using cargo from a rustup
installation works however...
Ok, using cargo from rustup
, but gcc
from nixpkgs (nix profile install nixpkgs#gcc
instead of apt-get install build-essential) produces the error. So I suspect something in that
cc` or its configuration is at fault...
With Ubuntu 24
and libssl-dev
installed, I have solved this problem by symlinking the missing files from /usr/include/x86_64-linux-gnu/
to /usr/include/openssl/
sudo ln -s /usr/include/x86_64-linux-gnu/openssl/opensslconf.h /usr/include/openssl/opensslconf.h
sudo ln -s /usr/include/x86_64-linux-gnu/openssl/configuration.h /usr/include/openssl/configuration.h
This also happens when utilizing zig as a replacement for cc
I've had the same issue while trying to build dog v0.1.0. The issue was solved by adding openssl
as a dependency in the Cargo.toml
file.
Line added under [dependencies]
[dependencies]
openssl = { version = "0.10.35", features = ["vendored"] }
After that try cargo build
again.
OS: Debian GNU/Linux 12 (bookworm) Kernel: 6.9.7-1~bpo12+1 (2024-07-03) x86_64 GNU/Linux Cargo Version: 1.78.0 Rustc version: 1.78.0
Reference was taken from a Stackoverflow thread.
I'm currently seeing an error:
Full log available in this gist.
However I have
pkg-config
andlibssl-dev
installed and up to date:Inspecting
/usr/include
, I can see that/usr/include/openssl/
has 133 header files, all the usual suspects, and/usr/include/aarch64-linux-gnu/openssl/
contains two header files:configuration.h
andopensslconf.h
.For reproducibility, I'm attempting to
cargo build
a rust project that depends onopenssl-sys
from within this Docker container: