This post was published 41 days ago . The information described in this article may have changed.
This post is auto-generated from RSS feed
The Rust Programming Language Forum - Latest topics . Source:
How do you fix cargo-leptos installation errors because of openssl-sys?
Hi!
I'm a rust beginner trying to install cargo-leptos
. I've installed cargo-leptos before, but I'm reinstalling it on a different device and I'm running into some difficulty.
I've installed openssl
through Chocolatey, and these are my openssl
related environment variables:
OPENSSL_CONF="C:\Program Files\OpenSSL-Win64\bin\openssl.cfg"
OPENSSL_INCLUDE_DIR="C:\Program Files\OpenSSL-Win64\include"
OPENSSL_LIB_DIR="C:\Program Files\OpenSSL-Win64\lib\VC\x64\MD"
OPENSSL_NO_VENDOR="1"
With these environment variables, I get an error like
OpenSSL libdir at ["C:\Program Files\OpenSSL-Win64\lib\VC\x64\MD"] does not contain the required files to either statically or dynamically link OpenSSL
When I set OPENSSL_STATIC="1"
, the error changes to
could not find native static library ssl, perhaps an -L flag is missing?
What am I doing wrong?
Could someone help me please?
Thanks in advance!
P. S.
I used this link as a reference, and from what I remembered from the last time I installed cargo-leptos
, it worked. Now, it doesn't. Maybe I missed something?
opened 01:21PM - 21 Oct 21 UTC
closed 07:53PM - 31 Oct 21 UTC
`cargo build` fails on my Windows 10 as openssl could not be found. However, it … is installed in `c:\Program Files\OpenSSL-Win64`. The Distributor is http://slproweb.com/products/Win32OpenSSL.html. If only installations installed using vcpkg are supported, could you mention this in the docs?
Thanks and thanks for great crate!
Bernd
My system info is:
```
$HOST = x86_64-pc-windows-msvc
$TARGET = x86_64-pc-windows-msvc
openssl-sys = 0.9.67
```
The command output is:
```
λ cargo build
Compiling openssl-sys v0.9.67
Compiling atty v0.2.14
Compiling clap v2.33.3
error: failed to run custom build command for `openssl-sys v0.9.67`
Caused by:
process didn't exit successfully: `c:\Users\krietens\Projects\rust-openssl\target\debug\build\openssl-sys-9a902e1719db51b3\build-script-main` (exit code: 101)
--- stdout
cargo:rustc-cfg=const_fn
cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_LIB_DIR
X86_64_PC_WINDOWS_MSVC_OPENSSL_LIB_DIR unset
cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
OPENSSL_LIB_DIR unset
cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_INCLUDE_DIR
X86_64_PC_WINDOWS_MSVC_OPENSSL_INCLUDE_DIR unset
cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
OPENSSL_INCLUDE_DIR unset
cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_DIR
X86_64_PC_WINDOWS_MSVC_OPENSSL_DIR unset
cargo:rerun-if-env-changed=OPENSSL_DIR
OPENSSL_DIR unset
note: vcpkg did not find openssl: Could not look up details of packages in vcpkg tree could not read status file updates dir: Das System kann den angegebenen Pfad nicht finden. (os error 3)
--- stderr
thread 'main' panicked at '
Could not find directory of OpenSSL installation, and this `-sys` crate cannot
proceed without this knowledge. If OpenSSL is installed and this crate had
trouble finding it, you can set the `OPENSSL_DIR` environment variable for the
compilation process.
Make sure you also have the development packages of openssl installed.
For example, `libssl-dev` on Ubuntu or `openssl-devel` on Fedora.
If you're in a situation where you think the directory *should* be found
automatically, please open a bug at https://github.com/sfackler/rust-openssl
and include information about your system as well as this message.
$HOST = x86_64-pc-windows-msvc
$TARGET = x86_64-pc-windows-msvc
openssl-sys = 0.9.67
It looks like you're compiling for MSVC but we couldn't detect an OpenSSL
installation. If there isn't one installed then you can try the rust-openssl
README for more information about how to download precompiled binaries of
OpenSSL:
https://github.com/sfackler/rust-openssl#windows
', C:\Users\krietens\.cargo\registry\src\github.com-1ecc6299db9ec823\openssl-sys-0.9.67\build\find_normal.rs:174:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
```
Note: The URL in the output (https://github.com/sfackler/rust-openssl#windows) is not valid any more!
1 post - 1 participant
Read full topic
🏷️ rust_feed