问题描述

MAC 升级 Homebrew 导致icu4c库依赖版本问题 例如 node ,php 依赖icu4c 70 版本 Homebrew 升级后 icu4c自动升级到了 72 导致 无法找到70版本得依赖 (Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.70.dylib),

解决方案(2种):以node为例

方案1: 通过 brew upgrade node 升级有依赖问题得库 使用 nvm 来安装并切换你需要使用得版本 升级之前建议更换国内源 下面是更换中科大源得方法

# 替换各个源

$ git -C "$(brew --repo)" remote set-url origin https://mirrors.ustc.edu.cn/brew.git

$ git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git

$ git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git

# 使用zsh终端 替换 brew bintray 镜像

$ echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrc

$ source ~/.zshrc

# 使用bash终端 替换 brew bintray 镜像

$ echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile

$ source ~/.bash_profile

方案2: 手动安装 icu4c 依赖版本 需要注意更换链接中你自己缺失得icu4c对应版本

相关链接

评论可见,请评论后查看内容,谢谢!!!
 您阅读本篇文章共花了: