Error:Calling 'depends_on ... => :run' is disabled! There is no replacement. Please report this ...

配置Flutter中的ios环境时,执行brew install --HEAD libimobiledevice时,报异常,如下图:

Error:Calling 'depends_on ... => :run' is disabled! There is no replacement. Please report this ..._第1张图片

最终的解决方案:

卸载brew,重新安装;

1、卸载brew,

执行命令:/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

2、安装brew,

执行命令:/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 

之后重新执行,brew install --HEAD libimobiledevice,就没有错误了;

原因是因为升级mac系统导致brew部分功能不能使用的;

 

其他:如果brew install xxx, 按回车键以后,一直是Updating Homebrew... 长时间不动的话;

可以执行,羡慕的替换代码(四行),重置代码是等代码执行完毕以后,复原的配置;

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

替换homebrew-core.git:
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git 
重置brew.git:
cd "$(brew --repo)"
git remote set-url origin https://github.com/Homebrew/brew.git

重置homebrew-core.git:
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://github.com/Homebrew/homebrew-core.git

其他不明白的可以给我留言,加我:lanjixingxun

你可能感兴趣的:(Flutter)