Troubleshooting

Fix libcrypto.dll (or libssl.dll) errors on Windows

The libcrypto-3-x64.dll was not found error has four common causes: wrong architecture, missing VC++ runtime, PATH not set, or terminal not restarted. Fix each one in order.

Common error messages: libcrypto-3-x64.dll was not found · libssl-3-x64.dll is missing · The code execution cannot proceed because libcrypto.dll was not found

Most common causes

  • Architecture mismatch — mixing 32-bit DLLs with a 64-bit app (or vice versa).
  • Missing Microsoft Visual C++ Redistributable — OpenSSL depends on the MSVC runtime.
  • OpenSSL bin folder not on PATH — Windows cannot find the DLLs at runtime.
  • Terminal not restarted after PATH change — old sessions do not pick up new PATH entries.
  • App cannot locate DLLs — application looks in its own directory and the DLLs are not there.

Run these in a new terminal first

cmd.exe — new window
# Confirm openssl binary runs:
C:\> openssl version -a
# Check PATH resolves correctly:
C:\> where openssl
C:\Program Files\OpenSSL-Win64\bin\openssl.exe
# Confirm DLLs are present:
C:\> dir "C:\Program Files\OpenSSL-Win64\bin\libcrypto*"

Fix it in order

  • 1

    Match architectures

    On 64-bit Windows use the Win64 installer (Win64OpenSSL_Light-4_0_0.exe). Never mix 32-bit and 64-bit components — this is the single most common cause. Uninstall any 32-bit OpenSSL build and reinstall the 64-bit version from Win64 Prebuilt.

  • 2

    Install Microsoft Visual C++ Redistributable (x64)

    Download and install the latest x64 package from Microsoft, then reboot if prompted:

    PowerShell — admin
    PS> Invoke-WebRequest -Uri "https://aka.ms/vs/17/release/vc_redist.x64.exe" -OutFile vc_redist.x64.exe
    PS> .\vc_redist.x64.exe /quiet /norestart

    Or download manually from Microsoft's VC++ page.

  • 3

    Add bin folder to PATH

    If where openssl returns nothing, the bin folder is not on PATH. Follow the Add to PATH guide. Default path: C:\Program Files\OpenSSL-Win64in.

  • 4

    Restart terminal

    Close all open Command Prompt and PowerShell windows. Open a new one and test again. PATH changes only apply to new sessions.

  • 5

    Local DLL deployment (for app developers)

    If you ship an app that uses OpenSSL, copy the DLLs next to your executable. Windows searches the app directory first:

    cmd.exe
    C:\> copy "C:\Program Files\OpenSSL-Win64\bin\libcrypto-3-x64.dll" "C:\MyApp\"
    C:\> copy "C:\Program Files\OpenSSL-Win64\bin\libssl-3-x64.dll" "C:\MyApp\"

Common questions

Which DLL filename should I look for?
OpenSSL 3.x on Windows 64-bit uses libcrypto-3-x64.dll and libssl-3-x64.dll. Older 1.x builds used libeay32.dll and ssleay32.dll. Make sure the version matches your application.
Error persists after installing VC++ Redistributable
Try rebooting. Also confirm you installed the x64 package, not x86. If it still fails, reinstall OpenSSL from scratch using the Win64 Prebuilt.
Can I copy the DLLs from another machine?
Only if architecture and OpenSSL version match exactly. Copying mismatched DLLs typically worsens the problem. Use the official installer to get a matching set.

Need a fresh install?

Reinstalling with the correct 64-bit version fixes most DLL errors.

Win64 Prebuilt →

Related guides