You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在Windows10/11上从源码编译安装OpenSSL 3?

在Windows 11/10上从源码编译安装OpenSSL 3的问题

我目前使用Windows 11,推测Windows 10的安装步骤与此一致。多方查找资料后,始终找不到能成功在Windows上安装OpenSSL的完整教程。现有解决方案多为临时替代方案,比如使用Git附带的OpenSSL版本;我当前用的是XAMPP中的OpenSSL,但这并非我想要的——我需要从源码安装OpenSSL 3,而Git和XAMPP自带的都是1.1.1版本。

尝试过各种方法,但OpenSSL官方说明信息不足,仅给出一些提示后就用省略号带过,例如(./Configure...)。我曾尝试遵循官方的MinGW编译文档,但在MinGW环节卡住了:

我已在Windows上安装了MSYS32和Perl,并在MSYS32中安装了整个mingw-w64-ucrt-x86_64-toolchain工具链包,包含以下19个成员:

$ pacman -S mingw-w64-ucrt-x86_64-toolchain
:: There are 19 members in group mingw-w64-ucrt-x86_64-toolchain:
:: Repository ucrt64
   1) mingw-w64-ucrt-x86_64-binutils  2) mingw-w64-ucrt-x86_64-crt-git
   3) mingw-w64-ucrt-x86_64-gcc  4) mingw-w64-ucrt-x86_64-gcc-ada
   5) mingw-w64-ucrt-x86_64-gcc-fortran  6) mingw-w64-ucrt-x86_64-gcc-libgfortran
   7) mingw-w64-ucrt-x86_64-gcc-libs  8) mingw-w64-ucrt-x86_64-gcc-objc
   9) mingw-w64-ucrt-x86_64-gdb  10) mingw-w64-ucrt-x86_64-gdb-multiarch
   11) mingw-w64-ucrt-x86_64-headers-git  12) mingw-w64-ucrt-x86_64-libgccjit
   13) mingw-w64-ucrt-x86_64-libmangle-git  14) mingw-w64-ucrt-x86_64-libwinpthread-git
   15) mingw-w64-ucrt-x86_64-make  16) mingw-w64-ucrt-x86_64-pkgconf
   17) mingw-w64-ucrt-x86_64-tools-git  18) mingw-w64-ucrt-x86_64-winpthreads-git
   19) mingw-w64-ucrt-x86_64-winstorecompat-git

但gcc命令仍无法使用,我推测这是因为未将其添加到MSYS32的PATH中,但官方并未给出相关操作说明;此外,安装完整工具链后C:\msys64\mingw64\bin目录仍是空的!

文档中还提到:

除此之外,请遵循INSTALL.md中的Unix/Linux指令。

于是我查看了INSTALL.md,但其中仅给出如下简略提示:

$ ./Configure
$ make
$ make test

为何在Windows上编译安装OpenSSL如此复杂?我需要的是官方源码安装方式,而非Git、XAMPP这类临时方案或未知第三方工具(官方为何不提供.exe安装包?)。希望此帖能为后续需要在Windows上安装OpenSSL的用户提供完整参考。


内容的提问来源于stack exchange,提问作者pileup

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.20 21:12:49