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

VSCode中使用Agda时libicuuc.73.dylib依赖加载失败求助

解决VSCode中Agda语言库加载失败问题(libicuuc.73.dylib缺失)

错误信息

dyld[9071]: Library not loaded: @loader_path/dylib/libicuuc.73.dylib
Referenced from: <41CE9F56-E2D2-3C41-8137-4FCDB6FDAE40> /Users/mac/Library/Application Support/Code/User/globalStorage/banacorn.agda-mode/v0.2.6.4.0.3-darwin/als
Reason: tried: '/Users/mac/Library/Application Support/Code/User/globalStorage/banacorn.agda-mode/v0.2.6.4.0.3-darwin/dylib/libicuuc.73.dylib' (not a mach-o file), '/usr/local/lib/libicuuc.73.dylib' (no such file), '/usr/lib/libicuuc.73.dylib' (no such file, not in dyld cache)
[Error - 3:38:36 AM] Server initialization failed.
Message: Pending response rejected since connection got disposed
Code: -32097
[Error - 3:38:36 AM] Agda Language Server client: couldn't create connection to server.
Message: Pending response rejected since connection got disposed
Code: -32097


解决方案(按顺序尝试)

方案一:通过Homebrew安装对应版本ICU库

  1. 打开「终端」应用(在Launchpad的「其他」文件夹内)
  2. 未安装Homebrew的话,输入以下命令并回车安装:
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    
  3. 安装完成后,输入命令安装ICU 73版本:
    brew install icu4c@73
    
  4. 创建软链接让系统识别该库(输入后需输入电脑密码,终端不会显示输入内容,直接回车即可):
    sudo ln -s /usr/local/opt/icu4c@73/lib/libicuuc.73.dylib /usr/local/lib/libicuuc.73.dylib
    sudo ln -s /usr/local/opt/icu4c@73/lib/libicui18n.73.dylib /usr/local/lib/libicui18n.73.dylib
    sudo ln -s /usr/local/opt/icu4c@73/lib/libicuio.73.dylib /usr/local/lib/libicuio.73.dylib
    sudo ln -s /usr/local/opt/icu4c@73/lib/libicudata.73.dylib /usr/local/lib/libicudata.73.dylib
    
  5. 重启VSCode测试。

方案二:修复Agda扩展目录内的损坏库文件

  1. 终端输入命令进入Agda扩展的库文件目录:
    cd "/Users/mac/Library/Application Support/Code/User/globalStorage/banacorn.agda-mode/v0.2.6.4.0.3-darwin/dylib"
    
  2. 删除损坏的库文件:
    rm libicuuc.73.dylib
    
  3. 从Homebrew安装目录复制正确文件:
    cp /usr/local/opt/icu4c@73/lib/libicuuc.73.dylib .
    
  4. 重启VSCode测试。

方案三:更换Agda扩展版本

  1. 在VSCode「扩展」面板找到「Agda Mode」
  2. 点击扩展卡片右下角齿轮图标,选择「安装另一个版本」
  3. 选择更早或稍新的版本(如v0.2.6.3.x.x)安装,重启VSCode测试。

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.20 08:48:20