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

Windows 11下编译R-devel时binutils报错求助(MSYS2/Rtools4.3)

解决R-devel编译时ld.exe内部错误(binutils版本问题)

你遇到的是binutils 2.40版本的已知内部错误,该bug在2.39版本不存在,且在2.40-2及后续版本中已修复。以下是在MSYS2(Rtools 4.3环境)中调整binutils版本的具体操作:

方案一:降级binutils到2.39版本

  1. 打开Rtools 4.3对应的MSYS2终端(启动Rtools43后进入的shell环境即可)
  2. 查看当前binutils版本,确认是2.40:
    pacman -Q mingw-w64-x86_64-static-binutils
    
  3. 从MSYS2存档仓库安装2.39版本:
    pacman -U https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-static-binutils-2.39-5-any.pkg.tar.zst
    
  4. 锁定版本,防止后续更新自动升级回2.40:
    pacman -Syu --ignore mingw-w64-x86_64-static-binutils
    

方案二:升级到修复后的binutils版本(2.40-2及以上)

  1. 打开Rtools 4.3对应的MSYS2终端
  2. 更新包数据库:
    pacman -Sy
    
  3. 升级binutils包:
    pacman -S mingw-w64-x86_64-static-binutils
    
  4. 验证升级后的版本,确认版本号≥2.40-2:
    pacman -Q mingw-w64-x86_64-static-binutils
    

注意事项

  • 操作前建议备份当前Rtools环境,避免意外问题
  • 如果后续需要恢复默认版本,去掉--ignore参数重新执行升级命令即可
  • 确保操作始终在Rtools 4.3对应的MSYS2终端中进行,不要混淆其他MSYS2环境

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.17 19:03:21