vcpkg 错误 error: curl operation failed with error code 35 (SSL connect error).【莫名奇妙解决的】

最近更新于 2026-05-20 21:22

  • Windows 11 25H2
  • Visual Studio Community 2026
  • vcpkg 2026-03-04-4b3e4c276b5b87a649e66341e11553e8c577459c
  • curl 8.19.0 (Windows) libcurl/8.19.0 Schannel zlib/1.3.1 WinIDN WinLDAP

2026/5/20
两台 Windows 11 电脑,同样的 vcpkg、同样的代理配置和节点(整个软件含配置复制),一台 vcpkg 正常,一台出错如下
file

严重性 代码 说明 项目 文件 行 抑制状态 详细信息

错误 curl 操作失败,错误代码为 35 (SSL connect error). CadTools C:\work\development\CadTools\EXEC 1

错误 不是暂时性网络错误,不会从 https://github.com/ip7z/7zip/releases/download/26.00/7z2600.exe 重试下载 CadTools C:\work\development\CadTools\EXEC 1

错误 MSB3073 命令“"C:\Program Files\Microsoft Visual Studio\18\Community\VC\vcpkg\vcpkg.exe" install  --x-wait-for-lock --triplet "x64-windows-static-md" --vcpkg-root "C:\Program Files\Microsoft Visual Studio\18\Community\VC\vcpkg\\" "--x-manifest-root=C:\work\development\CadTools\\" "--x-install-root=C:\work\development\CadTools\vcpkg_installed\x64-windows-static-md\\" ”已退出,代码为 1。 CadTools C:\Program Files\Microsoft Visual Studio\18\Community\VC\vcpkg\scripts\buildsystems\msbuild\vcpkg.targets 183

手动执行 vcpkg 报错

C:\Users\ZhaoHongfei\Desktop>"C:\Program Files\Microsoft Visual Studio\18\Community\VC\vcpkg\vcpkg.exe" install  --x-wait-for-lock --triplet "x64-windows-static-md" --vcpkg-root "C:\Program Files\Microsoft Visual Studio\18\Community\VC\vcpkg\\" "--x-manifest-root=C:\work\development\CadTools\\" "--x-install-root=C:\work\development\CadTools\vcpkg_installed\x64-windows-static-md\\"
A suitable version of cmake was not found (required v3.31.10).
Extracting cmake...
A suitable version of 7zip was not found (required v26.0.0).
Downloading https://github.com/ip7z/7zip/releases/download/26.00/7z2600.exe -> 7z2600.7z.exe
error: curl operation failed with error code 35 (SSL connect error).
error: Not a transient network error, won't retry download from https://github.com/ip7z/7zip/releases/download/26.00/7z2600.exe
note: If you are using a proxy, please ensure your proxy settings are correct.
Possible causes are:
1. You are actually using an HTTP proxy, but setting HTTPS_PROXY variable to `https://address:port`.
This is not correct, because `https://` prefix claims the proxy is an HTTPS proxy, while your proxy (v2ray, shadowsocksr, etc...) is an HTTP proxy.
Try setting `http://address:port` to both HTTP_PROXY and HTTPS_PROXY instead.
2. If you are using Windows, vcpkg will automatically use your Windows IE Proxy Settings set by your proxy software. See: https://github.com/microsoft/vcpkg-tool/pull/77
The value set by your proxy might be wrong, or have same `https://` prefix issue.
3. Your proxy's remote server is out of service.
If you believe this is not a temporary download server failure and vcpkg needs to be changed to download this file from a different location, please submit an issue to https://github.com/Microsoft/vcpkg/issues

C:\Users\ZhaoHongfei\Desktop>

目前推断问题来源于调用的 curl
执行下面命令失败

curl -I -v https://github.com/ip7z/7zip/releases/download/26.00/7z2600.exe

会提示错误

* schannel: next InitializeSecurityContext failed: CRYPT_E_REVOCATION_OFFLINE (0x80092013) - 由于吊销服务器已脱机,吊销功能无法检查吊销。

* closing connection #0

curl: (35) schannel: next InitializeSecurityContext failed: CRYPT_E_REVOCATION_OFFLINE (0x80092013) - 由于吊销服务器已脱机,吊销功能无法检查吊销。

继续验证
使用参数禁用检查吊销服务器之后,可以成功访问

curl --ssl-no-revoke -I -v https://github.com/ip7z/7zip/releases/download/26.00/7z2600.exe

解决这个问题的思路有:
1.访问吊销服务器是不是没有走代理,所以失败了。vcpkg 可能是使用内置的 curl,这个不知道怎么强制它走代理,试过加各种参数都无效。
2.访问吊销服务器的进程是不是被拦截了。我后面把火绒联网控制中的所有位于 C:\Windows\System32 中被设置为阻止联网的进程都放行了。
3.想办法让 vcpkg 内部的 curl 也禁止检查吊销服务器。以管理员身份打开 PowerShell 执行

reg add "HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL" /v "ClientCertificateRevocationCheck" /t REG_DWORD /d 0 /f

在我尝试 2 和 3 的方法后,没有当场生效,后面过了几十分钟突然就好了。所以我也不知道到底哪一步生效了,有可能不是我这里的修改解决了问题,也可能是我这里的修改后当时服务没有重启,所以滞后恢复的。这个问题从昨天晚上就发现,今天中午午休都没休息,折腾了我一个半小时,没有任何结果。下班了晚上又继续折腾,目前至少恢复了。这里就做个记录,给其他遇到这个问题的人一种解决思路,也给自己留一个备份记录。

vcpkg 错误 error: curl operation failed with error code 35 (SSL connect error).【莫名奇妙解决的】
Scroll to top