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

使用locuszoomr::link_LD遇SEC_E_CERT_EXPIRED证书过期错误求助

问题重现

执行代码时触发SSL证书过期错误:

> loc <- locuszoomr::link_LD(loc, token = "My_TOKEN")
Error in curl::curl_fetch_memory(url, handle = handle) : 
  schannel: next InitializeSecurityContext failed: SEC_E_CERT_EXPIRED (0x80090328) - The received certificate has expired.
Matched 0 SNPs (0.25 secs)

环境信息:R 4.3.3,SSL版本为(OpenSSL/3.1.2) Schannel

可行解决办法

  • 临时跳过证书验证(仅用于测试)
    给link_LD传递自定义curl句柄,禁用证书校验:

    library(curl)
    custom_handle <- new_handle(ssl_verifypeer = FALSE)
    loc <- locuszoomr::link_LD(loc, token = "My_TOKEN", curl_handle = custom_handle)
    

    注意:此方法会降低请求安全性,仅适合临时排查问题,正式环境不建议使用。

  • 更新系统根证书
    错误本质是系统信任的根证书库过期,无法验证目标服务器证书:

    • Windows系统:通过Windows更新安装最新根证书包,或手动下载微软官方提供的根证书更新文件。
    • Linux/WSL环境:重新安装系统证书包,执行命令:
      sudo apt update && sudo apt install --reinstall ca-certificates
      
  • 强制R使用OpenSSL后端替代Schannel
    当前使用的Schannel是Windows默认SSL后端,可切换为OpenSSL:

    1. 安装openssl包:
      install.packages("openssl")
      
    2. 设置环境变量指定SSL后端:
      Sys.setenv(CURL_SSL_BACKEND = "openssl")
      
    3. 重启R会话后重新执行link_LD函数。
  • 更新locuszoomr包
    旧版本包可能存在服务器地址或证书适配问题,更新到最新版本:

    install.packages("locuszoomr")
    

内容的提问来源于stack exchange,提问作者Jae Won Oh

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.25 18:12:05