How do you fix cargo-leptos installation errors because of openssl-sys?

⚓ rust    📅 2025-05-20    👤 surdeus    👁️ 3      

surdeus

Warning

This post was published 41 days ago. The information described in this article may have changed.

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?

1 post - 1 participant

Read full topic

🏷️ rust_feed